4

I'm testing in app billing on my android app. I cannot use the main account from my phone, because that's my developer account, and cannot be used to test in app billing. So I have a few different Google accounts logged into my phone. But when try to buy an item on my app, it automatically tries to buy it using the first account on the list. The only solutions I have so far is to either delete all accounts but the one I need to test. Or test it on my 4.2 tablet, which let's me change users. But none of these are ideal for my phone.

Is there any way that I can either, as an end user, change the current active account to test in app billing on my phone? Or to, in code, to let the user of my app choose which account will be used for in app billing?

VIBrunazo
  • 1,340
  • 14
  • 21

2 Answers2

8

No. Unfortunately, you can't do this without performing a reset of your phone. Just one reason why you need more than your daily usage phone to test with.

The only account that can test is the device's primary account, meaning the first account registered. For what it's worth, in my experience, even deleting all other accounts doesn't work, and I had to do a factory reset.

Step four here is the reference.

Geobits
  • 22,218
  • 6
  • 59
  • 103
  • > "even deleting all other accounts doesn't work, and I had to do a factory reset." -- Interesting insight, thanks for that, I was about to test the same thing ^^ Guess I'll just publish apps from an account that isn't my main use account, and be done with it. Thanks :) – VIBrunazo Feb 24 '13 at 06:36
  • @Geobits, thanks for your answer. Still a lot of time passed since you've posted it - is there a way to choose which account will be used for in-app purchase nowadays? – sberezin May 16 '15 at 23:05
1

There are some reports on the net that actually you have to delete the first account from Play and then another one is used. See http://code.google.com/p/marketbilling/issues/detail?id=76 or http://forums.androidcentral.com/market-help/204265-help-please-how-do-i-change-accounts-app-purchase.html

Piohen
  • 1,514
  • 15
  • 23