简体   繁体   中英

Android: How to test in-app billing

I have an app in the market without in-app billing. Now the new version should have in-app billing. Of course I am not ready yet and cannot upload the new version to the market, but how can I test and debug my unfinished code?

as a first step you need to test it using test requests. This testing is limited but will give you idea if the flow works correct or not.

Second step - real testing. You have to upload your app to Play (NOT publish, just upload), create another account (you can't buy things from yourself) and enable this account in your dev. console. Then you can purchase (for real money) the app and test how well it goes. Of course you can cancel/refund this anytime using your main account.

As a person implementing this in a couple of my apps I can tell you it's a pain.

Refer here for more info:

In-App Billing reference

You can use the test product id's set up by Google to test your app. Check out this link

首先,您可以使用四个保留的产品ID来测试静态应用内结算响应。其次,使用测试帐户并将应用程序上传为草稿,然后您可以使用自己的产品ID对其进行测试

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM