简体   繁体   中英

Application icon removed from home screen on upgrade

I have an app available on market. Now I am about to launch an upgrade. Due to some weird reason if I have an icon of old app on "Home screen" and I do upgrade ie replece, it deletes the homescreen icon. Is that due to change in icon?

OLD: <application android:name="FlirtoApp" android:theme="@style/FlirtoTheme" android:icon="@drawable/icon" android:label="@string/app_name">

NEW: <application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".app.App" android:debuggable="true">


You can work around this by using an activity alias in your manifest.

If you need to change the activity associated with the launcher, you can prevent the loss of the home screen icon during an upgrade by declaring the activity that used to hold the LAUNCHER category intent filter as an alias of the first. Like so:

    <activity android:name=".ui.NewLaunchActivity"
              android:label="@string/app_name">
    </activity>
    <activity-alias android:name="com.domain.app.OldLaunchActivity"
        android:targetActivity=".ui.NewLaunchActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity-alias>

I ran into this issue as well as this did the trick very nicely and the only side effect I've noticed is that ADB no longer auto-launches the application when it does the install from Eclipse.

You can also take a look at the docs .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM