LVL - 声明:“如果您没有从市场下载,则完成()”

发布于 2024-10-19 02:58:54 字数 148 浏览 3 评论 0原文

我需要一个带有“if 条件”的简单语句来执行此操作:“如果您没有从市场下载,则完成()”。 如果我理解得好的话,有两种类型的控制:我需要每次连接到Android Market服务器时都严格进行控制,将数据存储在手机中的任何位置以供进一步离线检查。 一如既往地感谢 Stack 公民!

I need a simple statement with an "if condition" that does this: "if you didn't download from market then finish()".
If I understood well there are two types of control: I need that the control is done strictly everytime connecting to the Android market server, storing data nowhere in the phone for further offline checks.
Thanks, as usual, to the Stack citizens!

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

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

发布评论

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

评论(2

年华零落成诗 2024-10-26 02:58:54

您应该按照应用程序许可开发指南实施许可,并使用StrictPolicy 详细信息参见 政策

StrictPolicy 不允许缓存响应,我会仔细考虑要求您的用户在线使用您的应用程序是否是一个好主意。

You should implement licensing as per the Application Licensing Dev Guide and use the StrictPolicy detailed under policies.

StrictPolicy does not allow the caching of responses and I would think carefully about whether it is a good idea to demand that your users are online to use your application.

独闯女儿国 2024-10-26 02:58:54

除了 David 建议之外,您还可以观察 ERROR_NOT_MARKET_MANAGED 响应代码。

ERROR_NOT_MARKET_MANAGED — Android Market 无法识别应用程序(包名称)。不要重试许可证检查。可以表明该应用程序不是通过 Android Market 发布的,或者许可实施中存在开发错误。

另外,大卫提出了一个很好的观点。应用程序肯定会时常无法与许可服务器进行通信。这可能会让您的用户发疯。

In addition to what David suggested, you could also watch for the ERROR_NOT_MARKET_MANAGED response code.

ERROR_NOT_MARKET_MANAGED — the application (package name) was not recognized by Android Market. Do not retry the license check. Can indicate that the application was not published through Android Market or that there is an development error in the licensing implementation.

Also, David makes a good point. Apps are guaranteed to fail communicating with the licensing server from time to time. This could drive your users mad.

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