为什么我总是从 android-lvl 得到相同的测试响应?
我刚刚在我的应用程序中实现了 LVL。我首先在我的开发者帐户设置中设置了对“LICENSED”的测试响应 =>一切正常;我收到这个答案。
当我将测试响应更改为“NOT_LICENSED”时,即使在更改开发者帐户中的值两小时后,我仍然在应用程序中得到“LICENSED”结果。
知道如何解决这个问题吗?
I just implemented LVL in my app. I first set up the test response to "LICENSED" in my developper account settings => everything works properly ; I receive this answer.
When I change the test response to "NOT_LICENSED", I still get the result "LICENSED" in my app even two hours after having changed the value in my developer account.
Any idea how to solve this issue ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所知并且已经在一篇评论中写道,ServerManagedPolicy 有一个缓存。这意味着,一旦您得到肯定的答复,只要该答复有效,就会被采纳。
即使您已连接,应用程序也不会在最后一次肯定响应的有效期内联系许可服务器。缓存不仅是为了离线使用,也是为了避免过多耗时的网络查询。
代替 ServerManagedPolicy
您应该执行以下操作:使用 StrictPolicy
并尝试它是否有效。完成测试后,将其更改回来,以便您的用户可以从 ServerManagedPolicy 的缓存中受益。
As you know and already wrote in one comment, the ServerManagedPolicy has a cache. That means that once you got a positive response, this response will be taken as long as it is valid.
The app will not contact the licensing server during the validity period of the last positive response, even if you are connected. The caching is not only for offline use but also to avoid too many time consuming network queries.
Here's what you should do: Instead of ServerManagedPolicy
use StrictPolicy
and try if it works. When you are done testing, change it back so your users can profit from the caching of ServerManagedPolicy.