Is it possible to debug locally Google Play's in-app billing in Android Studio?

后端 未结 5 944
悲&欢浪女
悲&欢浪女 2020-12-02 15:33

I am getting this error testing in-app subscription products locally.

authentication is required. you need to sign in to your google account

5条回答
  •  半阙折子戏
    2020-12-02 16:33

    Yes, just tried it and it works, thought it'd help someone save time.

    Once you upload your app for closed testing, then you make change and uploading again is tedious task. After frustration from this repetition I found this under official documentation

    Ordinarily, the Google Play Billing Library is blocked for apps that aren't signed and uploaded to Google Play. License testers can bypass this check, meaning you can sideload apps for testing, even for apps using debug builds with debug signatures without the need to upload to the new version of your app. Note that the package name must match that of the app that is configured for Google Play, and the Google account must be a license tester for the Google Play Console account.

    Ergo, I had a list of email accounts added as testers and licensing, as a result of alpha testing. I ran the code with same release keystore and the billing works exactly as in alpha testing.

    Just make sure to add your testing emails for licensing in new Play Console.

    Depends on the use case of your In-App Billing but making sure to have set-up purchase items

提交回复
热议问题