Artem Svystun
Artem Svystun

Reputation: 179

Testing of in-app purchases on several devices

I have followed google instructions for implementing in-app purchases service.

I was provided access to Google Play developer console as invited user. I took private key from it, and added my google account to the input field with test accounts. After that I craetad APK file and signed it with valid certificate. Then uploaded application to Google Play but didn't publish it. After it I created needed in-app purchases and published them. Then installed same signed apk file on my device.

Right after publishing in-app purchases and for some period of time my application was givin me message like "not found", but some time later it became available. And now I can buy all the items from the application, but no one else who installed the same APK file can't. I tried to add their email addresses into list of test accounts in profile - no luck, even the user owner of the Google Play account can't buy anything. They keep receiving smth like "item you selected is not available for purchase" When they try to buy test purchase item (the one that is described in documentation) they can successfult get "android.test.purchased: PURCHASED"

My question is: how can I test in-app purchases of unpublished app from different devices and accounts

Upvotes: 3

Views: 1233

Answers (3)

Stefano
Stefano

Reputation: 3215

Now you can test your applications directly from the store, you can "publish" alpha and beta version. To do it you have to follow this step:

  1. Create a Google Group with all the people you want to test your application
  2. Upload on the Play Store, the apk you want to test, it's like for the normal apk, just upload in the right tab
  3. On the Alpha/Beta tab, click on the Advanced option (top right)
  4. Click on Manage testers' list
  5. Add your Google group there, so now, people from the group, can go on the link and accept to be your tester
  6. Now your application, for the tester, is like a normal application, so you can download on different device and different accounts

This is really how some, becouse then you have just to promote the apk to production to publish it, and you are testing your apk in Play Store

(Maybe the name of the lable is not correct, becouse I'm italian and I just try to translate)

Upvotes: 0

GaRRaPeTa
GaRRaPeTa

Reputation: 5598

To make this work, the version code of the build the test user is using needs to match the version code of the app in Google Play, even if it is published only in beta and not in production.

If in Google Play the last uploaded apk was version code X, and your user is executing one app with another version code, they will receive that error message.

Also, the app your tester is executing have to be signed with a keystore other than the debug one.

Upvotes: 1

Scott Fisher
Scott Fisher

Reputation: 181

I think it will only allow purchases from one account. Here is from their documentation:

To perform end-to-end testing of in-app billing, the primary account on your device must be one of the test accounts that you registered on the Google Play site. If the primary account on your device is not a test account, you must do a factory reset of the device and then sign in with one of your test accounts. To perform a factory reset, do the following: Open Settings on your device. Touch Privacy. Touch Factory data reset. Touch Reset phone. After the phone resets, be sure to sign in with one of your test accounts during the device setup process.

http://developer.android.com/guide/google/play/billing/billing_testing.html

Upvotes: 0

Related Questions