Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Billing: isBillingSupported always unavailable

Tags:

android

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?

like image 959
Dusan Avatar asked Apr 23 '13 11:04

Dusan


1 Answers

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

  1. Connect the device to foreign country internet (in my case Belgium) via standard VPN connection
  2. In Location settings, turn off everything (GPS, Wi-Fi assist, ...)
  3. Stop (terminate) Play Store app if it is running
  4. In application settings, clear cache (NOT THE DATA) for the Play Store app
  5. 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.

like image 189
Dusan Avatar answered Nov 09 '22 14:11

Dusan