I've build apk and after install no icon in launcher. App works correctly and i can start activity with adb. But why app no icon in launcher i can't understand.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
.....skiped....
<application
android:name="DialerApplication"
android:label="@string/applicationLabel"
android:icon="@mipmap/ic_launcher_phone"
android:hardwareAccelerated="true"
android:supportsRtl="true"
android:backupAgent='com.android.dialer.DialerBackupAgent'>
<meta-data android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAIBXgtCEKQ6W0PXVnW-ZVia2KmlV2AxsTw3GjAeQ" />
<!-- The entrance point for Phone UI.
stateAlwaysHidden is set to suppress keyboard show up on
dialpad screen. -->
<activity android:name=".DialtactsActivity"
android:label="@string/launcherActivityLabel"
android:theme="@style/DialtactsActivityTheme"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:icon="@mipmap/ic_launcher_phone"
android:enabled="@*android:bool/config_voice_capable"
android:windowSoftInputMode="stateAlwaysHidden|adjustNothing">
......skiped......
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
......skiped......
</activity>
......skiped..........
</application>
</manifest>
It seems like i see cause of problem. If i try start my app with adb "adb shell am start mypackagename" i get error:
Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
But i set in AndroidManifest
intent-filter
for action android.intent.action.MAIN
and category android.intent.category.LAUNCHER
.
Why android don't register action and category for main activity?
Link to full AndroidManifest: https://github.com/Anton111111/android_packages_apps_Dialer/blob/cm-12.1_dialer_for_xperia/AndroidManifest.xml
It seems like android full ignores all my intent-filter
s for activity .DialtactsActivity
.