我在Google Play商店中有付费应用,并且在过去两年中一直使用LVL图书馆。在过去,我在包括Android V2.3.5(姜饼),V4.4(KitKat)和V5.1(Lollipop)在内的多种设备上测试了我的应用程序,一切正常,连接到谷歌许可证服务器。LVL失败(0x101 ERROR_CONTACTING_SERVER)w/Android V2.3.5
最近,我重新测试了我的所有Android设备,发现许可证验证库在Android V4.4和V5.1上运行完美,但我无法通过V2.3.5(姜饼)设备(摩托罗拉通电)。
我在旧版v2.3.5设备上的verify()
回调中收到responseCode = 0x101 (ERROR_CONTACTING_SERVER)
- 似乎超时连接。我尝试了几个账户,并且都在老姜饼平台上以同样的方式失败。
我还测试了以前的APK文件,这些文件曾经工作过,现在也失败了。
在过去的一年中,对较旧的Android操作系统版本的支持是否下降?
有什么我需要改变,以支持旧设备?
由于提前,
菲尔
SDK LVL代码
class LicenseValidator {
...
public void verify(PublicKey publicKey, int responseCode, String signedData, String signature) {
String userId = null;
// Skip signature check for unsuccessful requests
ResponseData data = null;
if (responseCode == LICENSED || responseCode == NOT_LICENSED ||
responseCode == LICENSED_OLD_KEY) {
// Verify signature.
...
switch (responseCode) {
case LICENSED:
case LICENSED_OLD_KEY:
int limiterResponse = mDeviceLimiter.isDeviceAllowed(userId);
handleResponse(limiterResponse, data);
break;
case NOT_LICENSED:
handleResponse(Policy.NOT_LICENSED, data);
break;
case ERROR_CONTACTING_SERVER:
Log.w(TAG, "Error contacting licensing server.");
handleResponse(Policy.RETRY, data);
break;
case ERROR_SERVER_FAILURE:
Log.w(TAG, "An error has occurred on the licensing server.");
handleResponse(Policy.RETRY, data);
break;