The time has come when our application is passing the 'real life' test. However, before we publish our application, we have to check in-app products on our test devices. However, durning my test I got a message "The publisher cannot purchase this item". How to deal with this?
In the Developer Console under "Settings-License testing", I have added my email address under "Gmail accounts with testing access", but this doesn't change anything...
This is because, developer cannot purchase anything from herself. Google has just designed its system in this way and unfortunately we have to accept it thinking. To fully check your in-app products, you will need to create a test account in the Google Play Developer Console and then install your app on a device where that is the primary account. There is no other way. See more on: http://developer.android.com/google/play/billing/billing_testing.html
Below I have collected a whole list of requirements that are necessary to start the testing process:
- Set up a new Gmail account, or use an existing one that is not your developer account,
- Add your email address to the test account in the Google Play Developer Console in Settings > Account Details > License Testing ("https://play.google.com/apps/testing/< package_name>"),
- On your device, go to Settings > Accounts, select your developer account, tap the three-dots menu, then select Remove the account from the device. You can add it again later,
- Create a release build of your app,
- Upload your app in Alpha or Beta channel in Google Play Developer Console,
- Fill in all the information store need to publish your app (publishing in beta or alpha channels didn't make your app visible to anyone except those in testers list),
- Publish it, and wait several hours for it to become active. Or setup an internal test channel to get the update faster,
- Instal your RELEASE version onto device. Before instalation make sure that device version and market version are signed by the same release key and market version number is not smaller than one defined in the build,
- Run your release version on device. If the alpha in the Play Store is not yet active, you'll see an error that the app version isn't configured for in-app billing. If the alpha is ready, you will be able to proceed through the test process.
If everything has been set up correctly, you will get payment screen. Now you can start testing your in-app products, even though you will not be charged for your purchases :-)