英文:
How do I implement 'account hold' status for yearly subscriptions with a 7 day free trial period in my Android app?
问题
我在我的应用中使用年度订阅,带有为期7天的免费试用期。
Google发布了其计费库的v3版本,并向开发者发送电子邮件,同时在博客文章中请求在2020年11月之前升级到v3。
换句话说,任何应用都应在2020年11月之前管理“账户保持”状态。
实施“账户保持”需要使用RTDN / Pub/Sub:
https://developer.android.com/google/play/billing/subs#account-hold
问题:我真的不明白如何实现这一切混乱。
我如何在我的Android应用中为年度订阅的7天免费试用期实现“账户保持”?
英文:
I use yearly subscriptions with a 7 day free trial period in my app.
Google released the v3 of its billing library and sent emails to developers + wrote blog articles in order to ask an upgrade to the v3 by November 2020.
Namely, any app should manage the 'Account Hold' status by November 2020.
Implementation of the 'Account Hold' stuff requires the use of RTDN / Pub/Sub:
https://developer.android.com/google/play/billing/subs#account-hold
Problem: I really don't understand how to implement all this mess.
How do I implement 'account hold' for yearly subscriptions with a 7 day free trial period in my Android app?
答案1
得分: 3
如果您的应用程序不在后端服务器上存储用户的订阅信息,并使用BillingClient.queryPurchases()
获取其订阅状态,那么您无需更改任何内容。在账户暂停期间,您需要阻止用户访问您的高级内容。如果您的订阅信息不存储在后端上,这将自动处理。
然而,如果您的用户订阅信息存储在后端服务器上,那么您需要启用实时开发者通知。我在这里创建了一个简单的指南:https://link.medium.com/mhvjlisnQab
英文:
If your app does not store user's subscription information on a backend server and gets their subscription status using BillingClient.queryPurchases()
, then you don't need to change anything.
During account hold, you need to block users access to your premium content. This will automatically be handled if your subscription information is not stored on the backend.
If, however, your user subscription information is stored on a backend server, then you need to enable Real Time Developer Notifications. I created a simple guide here:
https://link.medium.com/mhvjlisnQab
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论