是否可以向服务添加许可证检查(使用许可证验证库)?

发布于 2024-10-09 20:42:27 字数 483 浏览 0 评论 0原文

第四个任务是将 LVL 与应用程序代码集成,如 http://developer 中所述.android.com/guide/publishing/licensing.html,是“添加代码以检查应用程序主活动中的许可证”。该文件说:

一旦您实施了以下政策: 管理对您的应用程序的访问, 下一步是添加许可证 检查您的应用程序,其中 发起许可查询 服务器(如果需要)并管理访问 基于许可证的申请 回复。所有添加工作 许可证检查和处理 响应发生在你的 main 中 活动源文件。

如果应用程序没有 Activity 类会发生什么?在仅包含 Android Service 的应用程序中,我们可以将许可证检查代码添加到 Service 源文件中吗?

The fourth task in integrating the LVL with one's application code, as is described by http://developer.android.com/guide/publishing/licensing.html, is "Adding code to check the license in one's application's main Activity". The document says:

Once you've implemented a Policy for
managing access to your application,
the next step is to add a license
check to your application, which
initiates a query to the licensing
server if needed and manages access to
the application based on the license
response. All of the work of adding
the license check and handling the
response takes place in your main
Activity source file.

What happens if the application has no Activity class? In an application consisting only of an Android Service, can we add license check code to a Service source file instead?

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

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

发布评论

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

评论(1

傲娇萝莉攻 2024-10-16 20:42:27

如果您从活动启动服务,则可以在启动活动中实现 LVL。或者,在启动时创建一个活动......类似于启动闪屏。

If you are starting the service from an activity, you can implement the LVL in the startup activity. Alternatively, create an activity at startup ... something similar to startup splashscreen.

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