Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I test in-app-billing with a non-published app?

I have an Android app that uses In-App-Billing to sell Account Managed Items.

I tested the app with the static response IDs and everything seems to work. I now want to test the app with real product Ids.

I created the app in the Google Play Store and uploaded a draft version of the app with the correct permissions. I now created an In-App-Billing item and published the item.

At the moment the app is unpublished. The item is created and published and I have a test account that is registered in the profile of the developer account and is the only account on the device that I use for testing. The app is signed with the same key as the uploaded draft. Edit:I'm testing with Android 4.1 && 4.03 at the moment

If I try to buy the item the Google Play Store pops up but shows a dialog with the following method: The item you requested is not available for purchase.

How can I test buying the item without publishing the app?

like image 349
Janusz Avatar asked Sep 07 '12 12:09

Janusz


People also ask

How do I test app subscriptions on Android?

Open the Google Play app. Choose Account -> Subscriptions & Payments -> Subscriptions. Click your test subscription and change the payment method to “Test card, always declines.”

How do I test in-app billing with application licensing?

Test in-app billing with application licensing. With application licensing, you can set up a list of Gmail accounts to test your in-app billing & subscription integration. Your own publishing account is always considered a licensed tester. To set up application licensing, start by adding your list of tester's Gmail addresses in the Play Console.

How do I test my Google Play billing library integration?

To test your Google Play Billing Library integration using test tracks, do the following: Publish your app to a test track . Note that after you publish an app to a testing track, it can take a few hours for the app to be available for testers.

Where should I publish my app for testing?

We recommend publishing your app to the internal test track. Make sure that your testers are also eligible to receive your release by following the instructions for managing testers by email address or using Google Groups. You've set up a test environment.

How do I test my in-app billing&subscription integration with Gmail?

With application licensing, you can set up a list of Gmail accounts to test your in-app billing & subscription integration. Your own publishing account is always considered a licensed tester. To set up application licensing, start by adding your list of tester's Gmail addresses in the Play Console.


2 Answers

It may take some time to reflect the changes on google play if you just uploaded the app and added the item there wait for some time near about 2 hr. it will be shown the item you want to purchase.

like image 159
skygeek Avatar answered Sep 18 '22 14:09

skygeek


For others who reach this thread, Now it's not possible to test In-app billing with just a draft version of the app.

Draft Apps are No Longer Supported Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:

  • You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist".

  • In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").

for details read https://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test

like image 37
Wahib Ul Haq Avatar answered Sep 20 '22 14:09

Wahib Ul Haq