I am testing In-App Billing on Samsung Galaxy Tab 2 7.0 and when I try check if the billing is available, I always get the response 3 - BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE (Billing API version is not supported for the type requested)
.
int response = payService.isBillingSupported(3, getPackageName(), "inapp");
I have created draft application, uploaded signed APK in developer console and added an email of the test account (in LICENSE TESTING field in dashboard which notes that those accounts are also used for billing tests). Also, my device is using this test account as primary account. I am debugging app in Eclipse.
Edit: Tested also on HTC Evo 3D, same thing, response always returns 3.
Edit: Do the test account must have a google wallet associated or something else in order to test the app? My location is Serbia, could this be the problem?
What is causing this problem and how to solve it?
I can now confirm that this is a real problem and has nothing to do with my devices or code. Problem is with Google Play Store and my location in Serbia.
Here are the official details for this issue from Google:
Currently, users in Serbia are reporting that they are no longer able to purchase Android apps on Google Play. We’re working hard to resolve this issue so that users in this country can download paid apps again; however, at this time, there is no workaround to the issue.
If you’re in Serbia and you’re getting errors when trying to purchase, or you don’t see paid apps at all, then you’re experiencing this known issue. We’ll continue to update this page with developments, so check back soon.
Issue first reported on: February 1, 2012
Last updated on: April 10, 2013
Now, my intent was to simply test the app billing and not to buy anything for real, however this was not possible since Play Store always acts like a production environment and has some issues with Serbia which, of course, are affecting developers too.
Resolution
- Connect the device to foreign country internet (in my case Belgium) via standard VPN connection
- In Location settings, turn off everything (GPS, Wi-Fi assist, ...)
- Stop (terminate) Play Store app if it is running
- In application settings, clear cache (NOT THE DATA) for the Play Store app
- Start Play Store app - it now loads different content aimed for country which VPN is targeting
Once the Play Store is targeting different country, my code started working perfectly.
I wrote this answer to help other people if they run into similar problem - who knows, maybe for some other country, some other time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With