4

With Android In-App Billing IAB 3, the API can query the current purchases using getPurchases().

If the device has multiple Google accounts, what is being returned?

  • All purchases for all accounts?

  • Purchases for one of the accounts?

Is there a way to getPurchases() for a specific account?

Thanks

OferR
  • 1,634
  • 19
  • 21
  • getPurchases() return results only for an account with is currently setup as primary Account(which we setup at the time of new phone purchase or after formatting device ) – ρяσѕρєя K Mar 27 '13 at 09:03
  • Thanks for your answer. Is your answer an official documented Google answer, or is it from your experience? Do you know if this is going to be changed to allow querying accounts other then the primary account? – OferR Mar 27 '13 at 09:09
  • @ρяσѕρєяK Please see comment above. Thanks. – OferR Mar 27 '13 at 10:13

1 Answers1

2

In short, the answer is 'No'. There is no way to control which account is queried.

At the time of writing this answer, the account that is used for getPurchases() is the last account added to the device. (BTW this is also the account used when in-app purchasing). According to the first link, this issue is currently being investigated by Google.

Some related links:

https://plus.google.com/111471886409455069782/posts/RognJUHbBfc

https://code.google.com/p/android/issues/detail?id=53307

Does In App Billing support multiple accounts?

Community
  • 1
  • 1
OferR
  • 1,634
  • 19
  • 21
  • 1
    Is there any progress on that issue? I mean, what happens now, end of 2017, when you have 2 account and execute getPurchases()? – Bevor Dec 27 '17 at 16:06