简体   繁体   English

在升级时从主屏幕删除应用程序图标

[英]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"> 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"> 新: <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. 如果您需要更改与启动器关联的活动,则可以通过将用于保存LAUNCHER类别intent过滤器的活动声明为第一个的别名来防止在升级过程中丢失主屏幕图标。 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. 我遇到了这个问题以及这个问题非常好,而且我注意到的唯一副作用是ADB在从Eclipse安装时不再自动启动应用程序。

You can also take a look at the docs . 您还可以查看文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 单击主屏幕时禁用应用程序图标 - Disable Application Icon While Clicking on Home Screen Android应用程序主屏幕图标显示默认的android图标? - Android application home screen icon showing default android icon? 主屏幕点击事件上的应用程序图标 - app icon on click event from home screen 从主屏幕启动应用程序图标进入主活动,而不是恢复当前状态 - Starting application from Home screen Icon coming to main Activity instead of reataing the current state 卸载Android应用程序时,不会从主屏幕删除应用程序启动器图标 - Application launcher icon is not deleted from Home screen when uninstalling android app 用户如何从主屏幕中删除检测Android应用快捷方式的方法? - How to detect android app shortcut is removed from the Home Screen by the user? Android图标显示在应用程序列表中,但在主屏幕上透明 - Android icon displays in application list but is transparent on home screen 如何根据屏幕分辨率查找主屏幕图标大小 - How to find home screen icon size from screen resolution 为什么我的应用程序徽标图标在主屏幕上没有显示? - Why My Application Badge Icon in home Screen Not showing? 我无法在主屏幕上的应用程序图标上显示通知计数 - I am not able to display notification count on application icon in home screen
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM