通知应用内的用户有新版本可用

Notify user within app that a new version is available(通知应用内的用户有新版本可用)
本文介绍了通知应用内的用户有新版本可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在市场上有一个 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.

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)