如何向之前在市场中发布的只有一个启动器图标的应用程序添加第二个启动器图标?

发布于 2024-12-20 20:27:01 字数 810 浏览 2 评论 0原文

我想要两个启动器图标用于我的应用程序中的两个不同活动。我已将其添加到清单文件中。

<activity ... android:name=".TestActivity01"> 
  <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter> 
</activity> 
<activity ... android:name=".TestActivity02"> 
  <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter> 
</activity> 

如果您从一开始就使用两个启动器图标安装应用程序,则效果很好。 我的问题是,我已经在市场中发布了我的应用程序,仅使用一个图标启动器。如果我只是将带有 .Main 和 .Launcher 选项的意图过滤器添加到另一个活动中,那么当用户更新应用程序时它不起作用。他们一直只有一个图标。如果他们卸载以前的版本然后安装新版本,那么他们将拥有两个图标。

问题:有没有办法可以强制“干净”升级?我没有丢失信息的问题。

I want two launcher icons for two different activities in my application. I have added this to the Manifest file.

<activity ... android:name=".TestActivity01"> 
  <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter> 
</activity> 
<activity ... android:name=".TestActivity02"> 
  <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter> 
</activity> 

This works fine if you install the app with the two launcher icons since the beginning.
My problem is that I have already published my app in the Market with one icon launcher only. If I just add the intent-filter with the .Main and .Launcher options to another activity it doesn't work when the users update the app. They keep having one icon only. If they uninstall the previous version and then install the new one then they will have the two icons.

Question: is there a way I can force a "clean" upgrade? I don't have problems with loosing information.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一身软味 2024-12-27 20:27:01

你好,第一次你在android市场更新应用程序一个lancher,第二次你更新你的应用程序在这个应用程序中的下一个版本你检查了包你可以修改mainfest文件另一个启动活动有什么用两个启动图标(用户这次下载你的应用程序另一个应用程序下载选项是否正确)在 Android 市场中,每次更新仅与软件包进行比较。

Hi first time u have update the application in android market one lancher and second time u have update the next version your application in this application u have check the package u can modify the mainfest file another lanching activity what is the use two lanching icons (user download u r app this time another app download option is it correct ) In android market every updations only compare to package only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文