It’s currently not possible to detect if the app was installed from either the Beta or Production Track on the Play Store.
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).
There are 2 Limitations to this though:
- You will need to update the mobile app version number(s) on your API
when the app is ready to go to production. - Mobile apps will be determined by their version number not what
Track they are on in Play Store.
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.