Signing Google Play apps and testing app billing

I have Google Play App Signing support enabled for my project, so Google Play is postponing my apk after downloading. If I want to install apk on device via adb for testing in app billing, apk must be signed with the same key as google play version, but with Google Play App subscription enabled it seems impossible. If I use the same apk that I have uploaded to google play, I get the error "this version of the app is not configured for billing via google play" when trying to purchase a product.

My question is, with Google Play App subscription enabled, how to test in app billing without uploading all test versions to google play?

+3


source to share


2 answers


For anyone looking for an alpha testing of Game Services, I think I have found a solution (or workaround).

Go to the Play Console ( https://play.google.com/apps/publish )> Game Services> Related Apps.

Here click on "Link Another App" and select one app when adding. Finally, when you authorize this application, change the SHA-1 key to the application debug key.



How to find SHA-1 key in android studio? Go to Gradle tab> Application> Tasks> Android> Double click Sign Report.

Hope this helps. :)

+1


source


I was looking for the same thing. But didn't feel like bundling another app like your answer. So here's what I did:

Even though I have already added my email address to the list of testers, I visited the select link to register my email address as a tester. Apparently this is also what needs to be done.



After that, I downloaded the alpha app from the Play Store (the link is also on the select page). Then I tried to launch it from Android Studio (signed with a boot key. I didn't check if the debug key is enough). This gives an invalid signature warning and reinstalls the app. But once the app is installed, you can test in-app purchases.

+1


source







All Articles