Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the Google ID used in an in-app billing purchase

It has come to my attention that a device may have multiple Google accounts logged into it simultaneously. I understand that pre-Honeycomb, there is a primary ID; from Honeycomb on you can simply plug in several. I currently have two IDs logged into my test tablet.

When purchasing from Google Play you can choose which account is used to make a purchase. I want to add in-app billing to an application I'm writing, and I want to make sure each Google ID gets its purchases on any device, which means I need to know which ID was used to make the purchase in the first place. This means I need to do one of the following:

  1. Force Google Play to use one of the Google IDs chosen from within my app by the user;
  2. Retrieve the ID that Google Play used to make the purchase.

The documentation seems to have been written with the assumption that only one purchaser would ever be active on one device. Is it possible to do this?

like image 970
Andrew Wyld Avatar asked Mar 20 '12 18:03

Andrew Wyld


People also ask

How do I find my Google Play purchase ID?

On the left menu, select Subscriptions and services. On the “Other purchase activity” card, select View purchases. Select the “Google Play” (or "Android Market") registration transaction. You will see your Transaction ID at the bottom right corner of the page.

How do I use a different Google Play account for in app purchases?

Choose "Accounts & Sync". You should see something that says "Manage Accounts." This screen lets you add and remove accounts. If it's not already in the list, add the account that you originally used to make the purchase.

How do you change which Google account you pay with?

If you want to use a different Google Account, sign out of the app through the settings and sign in with your other personal Google Account. To switch Google Accounts, log out and sign back in with a different Google Account. Important: Some settings may be lost when you log out of your account.


2 Answers

This seems to be an issue with the Google PlayStore application. The same has been reported at

https://code.google.com/p/marketbilling/issues/detail?id=76

like image 82
siddharthsn Avatar answered Sep 18 '22 17:09

siddharthsn


I guess the app will be tied to the google account you used to download the application.You might have to use the same google id to make the purchase. Otherwise, restore of purchases could be an issue.

like image 31
arjoan Avatar answered Sep 19 '22 17:09

arjoan