在 Android 中编写基于订阅的应用程序的方法

发布于 2024-08-27 05:25:31 字数 463 浏览 3 评论 0原文

我有一个 Web 服务和一个使用该 Web 服务的 Android 应用程序。我想做这个应用程序 基于订阅。用户将订阅该服务并能够使用它 直到他们的订阅有效。

我知道要创建这样的应用程序,我们必须集成 每次在后端使用服务时,都会对服务进行必要的检查并验证订阅。

但是,是否有可能在手机本身上完成所有(至少是大部分)这一切?是吗 可以在Android应用程序中实现以下功能吗?

  1. 使应用程序仅在有限的时间内工作(直到订阅有效)。 如果是,怎么办?
  2. 如何维护订阅数据以及在哪里维护?

创建此类应用程序的最佳方法是什么?

请指教。
谢谢!

[注意:这是我之前问过的这个问题的后续]

I have a Web Service and an Android application that uses this web service. I want to make this application
subscription based. The user would subscribe to the service and would be able to use it
till their subscription is valid.

I understand that to create such an application, we would have to integrate
necessary checks in the service and validate a subscription every time it is used on the backend.

But is it possible to do all(well, at least most of) this, on the handset itself? Is it
possible to achieve the following in an Android application?

  1. Make the application work only for a limited period of time(till the subscription is valid).
    If yes, how?
  2. How to maintain data about the subscription and where?

What could be the best approach to creating such an application?

Please advise.
Thanks!

[Note: this is a follow-up of this question I'd asked before]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

原来分手还会想你 2024-09-03 05:25:31

使应用程序仅适用于
有限的时间内(直到
订阅有效)。如果是,怎么办?

与处理任何程序的方式相同:如果订阅失败(通过对服务器的查找确定),不要让用户跳过启动屏幕或其他介绍性屏幕。

如何维护有关的数据
订阅在哪里?

在你的服务器上。设备上没有绝对安全的地方——那些拥有root权限或开发人员手机的人可以获取您可能存储在应用程序中的任何内容。

Make the application work only for a
limited period of time(till the
subscription is valid). If yes, how?

The same way you would with any program: if the subscription lapses (as determined by a lookup to your server), don't let the user get past the splash screen or other introductory screen.

How to maintain data about the
subscription and where?

On your server. There is no absolutely secure place on the device -- those with rooted or developer phones can get at anything you might have stored in your application.

丶情人眼里出诗心の 2024-09-03 05:25:31

在这里回答了一个类似的问题,您可能会能够使用新的应用内计费 API。

I answered a simular question here, you may be able to use the new in app billing API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文