I'm developing an android app using cordova and I wish to use the three given stages to release it gradually:
However, I'm using mixpanel to track some user inputs.
Mixpanel requires a token to work and I have 2 of them, one for beta and other for production, it is loaded with mixpanel.init("token1")
when the app starts.
Currently, I build an apk with no token defined to run in alpha, then I build another one with token1 to run in beta, and later on another apk with token2 to run in prod. It works, but it's a pain.
I wish to use the promote
option inside the Google Play Developer Console, so I could build one single apk (automated) that gets promoted to beta/prod when needed and knows which stage it is in, so it uses the token accordingly.
Is it possible? If not, is there a better way to make it work?
TL;DR Want to know which stage (alpha/beta/prod) the app is running in so it uses a token variable accordingly.
Alpha Testing is a type of software testing performed to identify bugs before releasing the product to real users or to the public. Alpha Testing is one of the user acceptance tests. Beta Testing is performed by real users of the software application in a real environment.
(computing, technology) An early version of a program or application, typically unstable, but useful to show what the product will do. Sometimes this stage is referred to as a preview version. Sometimes no more features are added after this release, but bug fixes continue.
The differences between alpha and beta are primarily between what they measure, or what they tell investors. What it measures: Alpha measures performance relative to a benchmark index and beta measures the volatility of an investment relative to a benchmark index.
Alpha Testing is performed by the Testers within the organization whereas Beta Testing is performed by the end users. Alpha Testing is performed at Developer's site whereas Beta Testing is performed at Client's location.
I'm not sure if this will help but are you using build.gradle to make different product flavours? You can make it so that it will generate a class with different final constants in each type of build.
So for your prod build, you can do something like this:
prod {
applicationId "zuul.com.android"
buildConfigField 'String', 'HOST', '"http://api.zuul.com"'
buildConfigField 'String', 'FLAVOR', '"prod"'
buildConfigField "boolean", "REPORT_CRASHES", "true"
}
and it comes out like this:
BuildConfig.HOST
BuildConfig.FLAVOR
BuildConfig.REPORT_CRASHES
And then you can have one for dev, beta, or whatever.
Check out these links:
http://blog.brainattica.com/how-to-work-with-flavours-on-android/
Deploying multiple build variants at a time - Android studio gradle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With