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

问题描述

我在市场上的Andr​​oid应用程序,我已经注意到,当我发布一个新版本可能需要相当一段时间要更新的应用程序。

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.

我希望是一样的东西是谷歌与谷歌浏览器的应用程序做(也许只是beta版,做它不知道)。

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.

推荐答案

有没有API或服务通过时,你可以与谷歌播放检查您的应用程序的最新版本是什么。

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

相反,你应该保持你的服务器上的最新版本code,并让您的应用程序会定期检查针对它自己的版本code。如果版本code是在服务器上的高,那么您的应用程序需要更新,并可以相应地告诉用户。

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.

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

10-10 10:19