在 Android 应用中实施应用内购买是否需要启用实时开发者通知?

Are Real-Time Developer Notifications necessary to be enabled for implementing In-App Purchases in an Android app?

目前我正在尝试学习如何使用 Google Play Billing Library V1.2 来实现应用内购买 (IAP) - 订阅主要在我的 Android 应用中。

在查看 Add subscription-specific features 时,我遇到了这个:

Also, before reading the rest of this page, you should also have real-time developer notifications enabled. Real-time Developer Notifications allow you to react proactively to state changes, to increase your engagement, and to reduce user turnover.

当我尝试检查 Add real-time developer notifications, it told me I needed to setup Cloud Pub/Sub using my own Google Cloud Platform (GCP) 项目时。 然后我检查了 GCP,发现这是一项收费高昂的服务,我似乎无法接受,考虑到这是我谈论的第一个应用程序。

所以,我的问题是,在 Android 应用程序中启用实时开发者通知以实现订阅真的是必须的吗?如果是,我们是否总是必须通过 GCP 等付费服务才能实现这一目标,或者是否也有任何免费选项?

不,我只是添加了对应用程序的订阅,并没有对实时通知进行任何操作。

如果您不实施 RTDN,那么您必须定期轮询 Google API 以获取最新的用户信息,并且您必须为所有用户执行此操作(这是付费的,您不想过度使用它)。您还必须为此实现逻辑,我会发现这非常脆弱且效率低下。此外,您将不得不从后台(如果有的话)管理撤销、取消等案例,或者您将不得不手动操作数据库。回到你的问题,这不是必须的,但实施它们会给你带来很多好处。