通知应用内的用户有新版本可用 [英] Notify user within app that a new version is available

查看:22
本文介绍了通知应用内的用户有新版本可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在市场上有一个 android 应用程序,我注意到当我发布新版本时更新应用程序可能需要很长时间.

I have an android app in the market and I've noticed that it can take quite a while for the app to be updated when I release a new version.

我希望类似于 Google 使用他们的 Google Chrome 应用程序所做的事情(可能只是测试版,它不确定).

What I was hoping is something like what Google do with their Google Chrome app (may only be the beta version that does it not sure).

我想做的是当用户启动我的应用程序时,它可以检查是否有可用的新版本,如果有,只需在底部显示一条小消息以通知用户有新版本可供下载.如果他们点击它,那么用户将被直接带到 Play 商店中的应用程序,以便他们可以开始更新.

What I want to do is when the user launches my app, it can do a check to see if there is a new version available, and if so, just display a small message at the bottom to inform the user that there is a new version available for download. If they click it then the user will be taken straight to the app within the play store so they can commence the update.

这是怎么做到的?我没有找到任何适用于 android 的东西,我发现了一些与 iOS 相关的东西,但显然对我没有好处.

How is this done? I've not managed to find anything for android, I've found a couple of things relating to iOS but obviously no good to me.

感谢您提供的任何帮助.

Thanks for any help you can provide.

推荐答案

当你可以在 Google Play 上查看你的应用程序的最新版本时,没有 API 或服务.

There is no API or service by when you can check with Google Play what the latest version of your app is.

相反,您应该在您的服务器上维护最新的版本代码,并让您的应用定期根据自己的版本代码检查它.如果服务器上的版本代码更高,那么您的应用需要更新,您可以相应地告诉用户.

Instead, you should maintain the latest version code on your server, and have your app check it periodically against its own version code. If the version code is higher on the server, then your app needs to be updated and you can tell the user accordingly.

这篇关于通知应用内的用户有新版本可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆