Development package name different from the PROD package name

1.2k views Asked by At

I have my PROD app installed on my android phone with the package name "com.mycompany.app". however to develop and test my app I use the package name "com.mycompany.debugapp". in this way I can have the 2 app at the same time installed on my phone, the PROD version and the development version.

This was working great style I decide to implement billing :( from my development app, when I call querySkuDetailsAsync, it's return me an empty list :( I guess it's because I use com.mycompany.debugapp instead of com.mycompany.app. Is their any way to test billing services from my development app com.mycompany.debugapp?

1

There are 1 answers

3
Perraco On BEST ANSWER

The problem you are facing with billing, is exactly as you thought due to the different package names. Regardless of whether your package names are similar, if they have at least 1 different character, then both the OS and Google treat them as two completely unrelated and different apps.

You should always use a fixed package name regardless the build type or any other requirement. The package name is your app's unique identifier and must be permanently fixed.

To differentiate debug/release builds use instead build variants.

If you need to test billing in debug, first publish a release build as internal test, then you will be able to test your debug builds. Notice it may take a few hours until you are able to start testing once published.