简体   繁体   English

如何让我的 android 应用程序自动检查 android 市场中的更新?

[英]How to enable my android app to auto check for updates in the android market?

I have my android app already installed on devices and now I want that if I have released a new version of that app in the play store market then the app automatically detects that there is a new version available and notify the user that they can update the app.我已经在设备上安装了我的 android 应用程序,现在我希望如果我在 Play 商店市场上发布了该应用程序的新版本,那么该应用程序会自动检测到有新版本可用并通知用户他们可以更新应用程序。 How can I do that?我该怎么做?

您可以创建一个带有 json 响应的 api 来检查版本,当更新可用时只需重定向到 google play 商店

You do not have to set this property in the application.您不必在应用程序中设置此属性。 You set this property in the Google Play in your application section like this:您可以在应用程序部分的Google Play中设置此属性,如下所示:

在此处输入图片说明

这不是官方的 Api 但它正在工作,当应用程序在 Playstore 上有新版本时,谷歌会自动发出通知,但是如果你想强制用户更新应用程序,那么你可以实现这个

The only case where you should be doing this is when your app uses a not packaged service (hosted on a server, in another app, etc).您应该这样做的唯一情况是当您的应用程序使用未打包的服务(托管在服务器上、另一个应用程序中等)时。

This service should return an adequate response if the client (your app) is outdated.如果客户端(您的应用程序)已过时,此服务应返回适当的响应。 If you recieve such a response, then you can redirect to the play store.如果您收到这样的回复,那么您可以重定向到 Play 商店。


If you don't use such a service and still want to do this, then check the android market api .如果您不使用此类服务​​但仍想这样做,请查看android market api

But really, you shouldn't.但实际上,你不应该。 The Play store already notifes the user if there is an update.如果有更新,Play 商店已经通知用户。 No need to do that again, you will only annoy users.无需再次这样做,您只会惹恼用户。

when you upload your application's update version on google play store .当您在 google Play 商店上传应用程序的更新版本时。 Google play store automatically send notification to users for update version of your application.So no need to send user a custom notification for update version. Google Play 商店会自动向用户发送应用程序更新版本的通知。因此无需向用户发送更新版本的自定义通知。 So only set this functionality on your play store account所以只在你的 Play 商店账户上设置这个功能

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM