Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test Google Play in app purchase?

From what I understand reading This link. It appears to me that the only way to test in app purchase is to write the complete code for in app purchase. And then do a proper build. Upload it to beta release. And then download the app via the opt in link.

But how do I develop it in the first place? Am I expected to write some lines of code and then do a build and upload it? That is a huge turn around time. Is there no way for me to have some test account that I can sign in go google play (on phone) with and then just make purchases?

Currently, my code already handles the products

android.test.purchased and android.test.canceled. How do I make it so that I can test my own products Ids? Currently it just says the product you are requesting is not available.

like image 734
Zhen Liu Avatar asked Mar 22 '17 03:03

Zhen Liu


People also ask

How do I test Google Play store?

Start an open testOpen Play Console and go to the Open testing page (Testing > Open testing). Select the Testers tab. Expand the "Manage testers" section. If the "Manage testers" section is empty, make sure you've uploaded an app bundle.

How do I verify In app purchases on Android?

Add VerificationScroll down to the Android Platform card and toggle the Log In-App Purchase Events Automatically to Yes if you have not already.


1 Answers

Google allowed to test your in app purchase in for dummy products like you mentioned android.test.purchased. To test real products you must have to deploy application in beta release at least. Following article will help you in detail :

An Android Studio Google Play In-app Billing Tutorial

Hope it will help.

like image 166
Hassan Munir Avatar answered Sep 20 '22 17:09

Hassan Munir