Does In App Billing support multiple accounts?

2019-01-19 00:54发布

问题:

Does InApp billing (V2 or V3) works for a user who uses several accounts and makes the purchase with an account that isn't the primary one?

PD: Some explanation required, no simple Yes/No

回答1:

In App Billing support multiple accounts reported as a bug in code.google, have a look at it

According to Mr.Sergej (posted in G+ android dev community) in-app products purchased with the first account won't be active anymore while using multiple user accounts!.



回答2:

InApp billing just charges the user and tells your app whether it was successful or not. It is up to you to figure out how to give the user what they purchased.

You can... toggle the SharedPreferences of the app to save their purchase. Obviously multiple people can use the same app on the same device with the purchase.

provide login functionality to save a purchase to a server, in case the user deletes the app or gets a new device.

Use one-time purchases to check whether the user has purchased previously. This won't carry over to several accounts on different devices/multiple-accounts-per-device.