且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有可能检测到android应用是beta版还是生产版?

更新时间:2023-10-13 17:56:10

当前无法检测是从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.