预加载 Android 应用程序 +让它接收更新

发布于 2024-11-14 09:06:56 字数 211 浏览 3 评论 0原文

我想在设备上“预加载”一个应用程序,但之后需要从 android 市场检索更新。

我该如何去做这样的事情呢?

请注意,无法首先在设备上手动加载应用程序。

我想要么创建某种启动器应用程序,然后从 Android 市场下载最新版本。这里有人有什么好的样品吗? :)。

或者当然有更好的建议!

多谢。不幸的是,这是一个非常紧迫的问题。

I would like to 'preload' a application on a device, but it needs to retrieve updates from the android market place afterwards.

How would I go about doing something like that?

Please note that it is not possible to manually load the application on the device first.

I was thinking either by creating some sort of launcher app, that will then download the latest version from the android market. Anyone have any good samples here? :).

Or better suggestions of course!

Thanks a lot. This is unfortunately a very urgent question.

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

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

发布评论

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

评论(2

幽蝶幻影 2024-11-21 09:06:56

来自 https://support.google.com/googleplay/android -developer/answer/113476?hl=en

只要满足以下条件,Google Play 就可以管理预加载应用程序的更新:

  • 预加载的应用需要位于系统分区
  • 预加载的应用程序必须是免费的
  • 预加载的应用需要使用与 Google Play 中发布的应用相同的签名进行签名
  • 预加载和更新的应用程序的包名称必须相同
  • 更新应用的版本代码需要大于预加载应用的版本代码

From https://support.google.com/googleplay/android-developer/answer/113476?hl=en

Google Play can manage updates to preloaded applications, provided the following conditions are met:

  • The preloaded app needs to be in the system partition
  • The preloaded app needs to be free
  • The preloaded app needs to be signed with the same signature as the app published in Google Play
  • The Package Name of the preloaded and updated app needs to be the same
  • The Version Code of the updated app needs to be greater than that of the preloaded app
故事未完 2024-11-21 09:06:56

我通过创建自己的更新检查器设法解决了这个问题。它连接到网络服务以了解是否有比当前版本更高的版本。如果是这种情况,我会启动一个 Android 市场视图意图(针对包名称),它将重定向到市场版本。

好的部分是,如果用户还没有配置市场,他必须先这样做。
然后他们就会到达可以安装应用程序的页面。

如果它们具有相同的包名,它将用新版本覆盖现有(预加载)应用程序。从那时起,它将与Android市场耦合。

I managed to get around this problem by creating my own update checker. It connects to a webservice to know if there's a version out with a higher version than the current. If that is the case, I launch an android market view intent (for the package name) that will redirect to the market version.

The nice part is, if the user doesnt have the market configured yet, he'll have to do that first.
Afterwards they then end up to the page where they can install the app.

If they have the same packagename, it will overwrite the existing (preloaded) application with the new version. From that moment on, it will be coupled to the android market.

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