是否有可能检测到android应用是beta版还是生产版? [英] Is it possible to detect that an android app is either a beta version or production version?

查看:100
本文介绍了是否有可能检测到android应用是beta版还是生产版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Google Play商店中使用Beta分级.对于应用程序方面的强制更新功能,我们要检测我们的应用程序是否来自Google Play商店的Beta阶段或生产阶段.在Android应用程序中有可能吗?

We use beta staging in google play store. For app side force update functionality we want to detect if our app is either coming from the beta stage or the production stage of the google play store. Is this possible in android apps?

推荐答案

当前无法检测是从Play商店的Beta还是Production Track安装了该应用.

It's currently not possible to detect if the app was installed from either the Beta or Production Track on the Play Store.

假定您的应用程序将连接到您拥有的API-您可以执行的操作是让该API确定该应用程序是Beta版还是Prod应用程序.例如,将被视为Prod应用程序的应用程序版本号存储在API上,当该应用程序连接到API时,它将其版本号传递给API,并且API返回一个响应,告知是否为Prod(版本与

Assuming your app will be connecting to an API that you own - What you can do is let the API determine if the App is a Beta or Prod App. For example store the app version number(s) that are considered a Prod app on the API, when the app connects to the API it passes it's version number to the API and the API returns a response with whether it is Prod (The version matches one it has stored) or Beta App (it's does not match one it has stored).

此操作有2个局限性:

  1. 您需要在API上更新移动应用的版本号 当应用准备好投入生产时.
  2. 移动应用将由其版本号而不是版本号决定 跟踪他们在Play商店中的状态.
  1. You will need to update the mobile app version number(s) on your API when the app is ready to go to production.
  2. Mobile apps will be determined by their version number not what Track they are on in Play Store.

如果您对这2个限制感到满意,那么您将只有1个APK,并可以确定您的应用是Prod还是Beta.

If you're happy with these 2 limitations then you will only have 1 APK and a means to determine if your app is Prod or Beta.

这篇关于是否有可能检测到android应用是beta版还是生产版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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