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!
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.
My experience on this error is:
Make sure to upload the signed APK to developer console.
Make sure to install the signed APK on your device not launch the app in the debugger.
Make sure to create a test account in your developer console.
Setup you testing account
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)
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.
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