Skip to content
Advertisement

Billing service unavailable on device. (response: 3:Billing Unavailable)

I’ve been struggling with this problem for days now. I know there are a lot of questions with the same problem on SO but i couldn’t get it to work.

What I have done

  • Uploaded APK in beta phase
  • Created Merchant account
  • Added test user

Code

AndroidManifest.xml

<uses-permission android:name="com.android.vending.BILLING" />

MainActivity.java

JavaScript

Tested on

  • Huawei P8 (Google Play Version 6.2.14)
  • In Switzerland, so a supported country for In-App Billing

What I’ve tried

The only thing I haven’t done from this list is the setup of the License Verification Library (LVL). But I couldn’t find any information that this step is required for an In-App Purchase. If not needed I want to do it without this library because I don’t really need it as stated on the Google Site.

The Google Play Licensing service is primarily intended for paid applications that wish to verify that the current user did in fact pay for the application on Google Play.

Is there something I miss?

Advertisement

Answer

Finally I got it to work! The problem was the following: Even though I put the IInAppBillingService.aidl in the com.android.vending.billing package, the generated class was in the wrong package as you can see in the code below.

JavaScript

To solve this, I deleted and recreated the com.android.vending.billing package with the IInAppBillingService.aidl. So if you have the same problem, check twice where the IInAppBillingService.java was generated.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement