我正在我的应用程序中实现 Google 的应用内结算库,并且想知道处理以下情况的最佳方法
Use Case:
- User U1 with Google Play Store Account G1 subscribes to Subscription S1.
- Now User U1 log out from the app and User U2 login the app.
Queries:
- What will happen if User U2 tries to subscribe the Subscription S1?
- Shall we restrict the User U2 by saying "This Subscription has already been subscribed to some other user from this Google Account"?
Use Case I:
- User U1 with Google Play Store Account G1 subscribes to Subscription S1.
- User U1 with Google Play Store Account G2 tries to subscribe Subscription S1.
Queries:
- Shall we restrict the User U1 by saying "You have already subscribed to this subscription by some other Google Account"?
Use Case II
- User U1 with Google Play Store Account G1 subscribes to Subscription S1.
- User U1 with Google Play Store Account G2 tries to subscribe Subscription S2.
Queries:
- Shall we allow the user to subscribe to different subscriptions with different Google Account?
一般查询:
- Shall we map each user with a different Google Account and if the user tries to purchase with some other Google Account, restrict it OR ask him to delink his existing linked Google Account first?
- Can we subscribe(purchase) a subscription from 2 users using the same Google Play Account? (Say using different
accountId
https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid)
我期待在最佳实践和事实方面对我的查询做出回应。
最佳答案
应用内商品的购买和订阅都与进行购买时使用的 Google 帐户严格关联。
您无法从一个 Google 帐户知道另一个帐户进行的购买,如果可能的话,这将是一个严重的安全问题。
如果两个用户(两个谷歌账户)想要使用同一个订阅,他们都必须单独购买。
关于android - 如何处理 In-App Billing Library 中的多个用户? (最佳实践),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63739893/
相关文章:
java - 如何在 Java 中测试不同的 "tables input"?
python-3.x - SendGrid 无法向 Yahoo 和 Outlook 发送列表-取消订
python - 如何在 Pandas DataFrames 中显示 IntEnum 的名称
r - 从 R 中的区间 [start, stop] 数据估计密度
javascript - 是否可以使用 javascript 将整个网页静音?
post - 错误启动内核 : '_xsrf' argument missing from POST
node.js - 在 node.js 中将字符串转换为 64 位 float