简体   繁体   中英

How to retrieve customer's email in In-App Billing transaction?

The JSON fields that are returned with a PURCHASE_STATE_CHANGED intent contain very useful information, but one piece that I am interested in is not listed: customer's email address.

Is there a way to retrieve it, using In-App Billing API?

If not, is there a way to retrieve some other unique identifier for the customer, so that a transaction can be associated with the customer, not the device?

If you are running Android 2.x and up, maybe you can get a way with the owner's email address ?

The downside of this is that it requires android.permission.GET_ACCOUNTS in the manifest. The more permissions your apps requires, the more likely you are to scare prospective users of your app...

Also note that "owner's email address" might not be the same as "purchase account email address" (especially since Honeycomb 3.0 )

I was struggling to solve this problem too. So what I've come to is using nonce value. Ideally you should generate nonce on the server side prior to sending IN-APP Billing request from your app, so in this case you can connect nonce value to customer's email.

I understand that it's a little bit clunky so if anyone knows better solution I'd like to see it to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM