Billing: isBillingSupported is always unavailable

I am testing In-App Billing on a Samsung Galaxy Tab 2 7.0, and when I try to check whether billing is available, I always get the answer 3 - BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE (Billing API version is not supported for the type requested) .

 int response = payService.isBillingSupported(3, getPackageName(), "inapp"); 

I created an application project, downloaded the signed APK in the developer's console, and added the test account email (in the LICENSE TESTING field in the control panel, which states that these accounts are also used for billing tests). In addition, my device uses this test account as the primary account. I am debugging an application in Eclipse.

Edit: checked also on HTC Evo 3D, same thing, answer always returns 3.

Edit: should the test account have a Google wallet or something else to test the application? My location is Serbia, could this be a problem?

What causes this problem and how to solve it?

+6
source share
1 answer

Now I can confirm that this is a real problem and has nothing to do with my devices or code. The problem is in the Google Play Store and my location in Serbia.

Here is the official information on this issue from Google:

Currently, users in Serbia are reporting that they can no longer purchase Android applications on Google Play. We worked hard to get this problem, so that users in this country can download paid applications again; however, there is currently no workaround.

If you are in Serbia and get errors when you try to buy, or you don’t see paid applications at all, then you are experiencing this well-known question. Well, keep updating this development page, so check back soon.

The issue reported earlier: February 1, 2012

Last updated: April 10, 2013

Now my intention was just to test the application billing and not really buy anything, however this was not possible, since the Play Store always acts as a production environment and has some problems with Serbia, which, of course, also affect developers.

Resolution

  • Connect the device to the Internet in another country (in my case, Belgium) through a standard VPN connection.
  • Turn off everything in the location settings (GPS, Wi-Fi assist, ...)
  • Stop (terminate) the Play Store app if it is running
  • In the app’s settings, clear the (NOT DATA) cache for the Play Store app.
  • Launch the Play Play Store app - now it downloads various content intended for the country for which the VPN is configured.

As soon as the Play Store is aiming for another country, my code began to work perfectly.

I wrote this answer to help other people if they run into a similar problem - who knows, maybe for some other country, another time.

+12
source

Source: https://habr.com/ru/post/943431/


All Articles