Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manage Android app flavors on Google Play

I just created 2 flavors for my app: Staging and Production.

Everything seems to work well in both flavors so now I would like to upload my staging release apk (signed) so that testers can test it.

As I have a different applicationId for my staging app:

    stage {
        applicationId defaultConfig.applicationId + ".stage"
        versionName defaultConfig.versionName + "-stage"
        resValue "string", "app_name", "MyApp Staging"
    }

Do I need to create a new App in console play console and deploy this apk to the new version or is there a way to use the same App?

Right now, when I try to upload the staging release app, I get the following error:

Upload failed
Your APK needs to have the package name com.my.app.
like image 236
amp Avatar asked Apr 30 '17 14:04

amp


People also ask

How do I add flavors to my Android?

Creating Product Flavor is pretty much easy in Android Studio, we simply need to add productFlavors block inside the Android block in the application-level build. gradle file. It's that simple to create product flavors.

How do you change app content in Google Play console?

Open Play Console and go to the App content page (Policy > App content). Under "Target audience and content," click Start (or, if you've previously filled out the Target audience and content section and want to make changes, click Manage).


1 Answers

If the applicationId is different, it would need to be a separate app in play store. This is on the documentation of applicationId

Every Android app has a unique application ID that looks like a Java package name, such as com.example.myapp. This ID uniquely identifies your app on the device and in Google Play Store. If you want to upload a new version of your app, the application ID (and the certificate you sign it with) must be the same as the original APK—if you change the application ID, Google Play Store treats the APK as a completely different app. So once you publish your app, you should never change the application ID.

If you don't want to "pollute" your play store, one other good option is to use Beta by Fabric for free to simplify distribution of your staging builds for your internal testers and stake holders. Using this they can even download any of the older releases and will be informed of new updates as soon as it is released. There is no waiting time unlike Google Play Store where it might take sometimes few hours or more to make the update available to all the users. Recently Fabric has been bought by Google.

P.S: I just a happy user of Fabric Beta and in no way related to them.

like image 164
Shobhit Puri Avatar answered Oct 03 '22 17:10

Shobhit Puri