问题
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:
- Force Google Play to use one of the Google IDs chosen from within my app by the user;
- 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?
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/9792571/get-the-google-id-used-in-an-in-app-billing-purchase