Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the item you requested is not available for purchase

I'm trying to integrate Android Market in-app purchases into my app, but unfortunately coming across an annoying error every time I try to purchase a real inapp product.

I've taken the sample application (Dungeons) and added it to my app. I've updated the Public Key and also updated the list of products to the following:

/** An array of product list entries for the products that can be purchased. */

private static final CatalogEntry[] CATALOG = new CatalogEntry[] {     new CatalogEntry("full", "Full v", Managed.MANAGED),  }; 

I've exported the application using Eclipse, and installed it on my phone and also uploaded it to the Android Market website. Also on the Android Market website I've added full as an in-app purchase and published it.

I've also added my googlemail account as a testing account (that is the one I'm signed into on my phone).

When I run the application on my phone I get a the item you've requested not available for purchase android message whenever I try to buy full, but if I try for example, android.test.purchased, it works absolutely fine.

The documentation for the item you've requested not available for purchase android states the following:

Indicates that Android Market cannot find the requested item in the application's product list. This can happen if the product ID is misspelled in your REQUEST_PURCHASE request or if an item is unpublished in the application's product list.

The product ID is definetely the same, it's definetely published and the request must be going through ok as it's the sample application .

i am using same version of apk and i published inapp products also and activated apk also. but still i am facing same problem please help me ho to fix it.

Any thoughts would be appreciated!

like image 839
laxman Avatar asked Oct 29 '12 06:10

laxman


People also ask

How do I check in app purchases on Android?

When you are testing in app purchases on Android, you must use a signed version of the app. Your Google Play email must be listed in the Google Play Console as a tester. The easiest way to do this is to publish your app to a Beta release with open testing.


1 Answers

My experience on this error is:

  1. Make sure to upload the signed APK to developer console.

  2. Make sure to install the signed APK on your device not launch the app in the debugger.

  3. Make sure to create a test account in your developer console.

  4. Setup you testing account

    1. Make sure to sign in your device with your test account.
    2. In a case of closed alpha/beta testing, make sure you have added your test account to selected testers group, you can do this on the page of management your alpha/beta version.
    3. In a case of closed alpha/beta testing, make sure your testing account have accepted participation in testing of this application via special invite link
  5. Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)

  6. Make sure to set VersionCode and VersionName in the manifest to be the same as the version in the developer console (Alpha, Beta or Production. Drafts does not work anymore). @alexgophermix answer worked for me.

If you're looking for testing payments without actual money withdrawal, you need additionally add your testing account to another special list of accounts "Gmail accounts with testing access", you can find that on play account setting(not project!). On the page where you can see a list of your projects go to settings, and then on "Account details" page (scroll down, it's almost in the bottom of page) you will find the "Gmail accounts with testing access" list.

like image 165
pinux Avatar answered Oct 05 '22 09:10

pinux