简体   繁体   中英

How to test in-App purchase in android?

I want to test in-App purchase before publishing.How do i create a test account for this ? Can anyone help me with all procedures need to be done ?

Try using this tutorial

http://developer.android.com/guide/market/billing/billing_testing.html

Basically, you need to make a specific/reserved product ID that you want to test your in-app purchase with. In particular, you can use the android.test.purchased product ID to simulate a successful purchase.

You just use one on the following product IDs during a purchase operation:

android.test.purchased

android.test.canceled

android.test.refunded

android.test.item_unavailable

By using a restricted set of product IDs, you can trigger static responses from Google Play, so you can test that your app correctly handles all the possible states. You should use this when integrating the Play Billing Library into our app, or for instrumentation testing.

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