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

試著忘記壹切 提交于 2019-11-28 21:23:59

问题


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?


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!