Reputation: 1
I have a paid app on the Google Play Store and have been using the LVL library for the past two years. In the past, I tested my app on multiple devices including Android V2.3.5 (Gingerbread), V4.4 (KitKat) and V5.1 (Lollipop), everything worked fine connecting to the google license server.
Recently, I retested on all my Android devices and found the license verification library runs perfectly on Android V4.4 and V5.1 but I can't make a successful connection from the V2.3.5 (Gingerbread) device (Motorola Electrify).
I get a responseCode = 0x101 (ERROR_CONTACTING_SERVER)
in the verify()
callback on the older v2.3.5 device - appears to time out connecting. I tried several accounts and both fail in the same way on the older Gingerbread platforms.
I also tested earlier APK files that used to work and they fail now also.
Did support for older Android OS versions get dropped over the past year?
Is there something I need to change to support the older devices?
Thanks in advance,
Phil
SDK LVL code
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;
Upvotes: 0
Views: 284
Reputation: 1
Okay, I figured it out tonight. Post Google Play Services 10.0.1, support for Gingerbread V2.3 is depreciated.
https://9to5google.com/2016/11/21/google-play-services-gingerbread-support-end/
https://developers.google.com/android/guides/releases
"Highlights from the Google Play services 10.0 release.
Google Play services updated to 10.0.1
This release fixes a missing minSdkVersion value in play-services-location.aar that caused unintended WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, and READ_PHONE_STATE permissions to be merged into app manifests. Android version 2.3.x (Gingerbread) Deprecation
Google Play services 10.0.x is the final release that includes full support for Android version 2.3.x (Gingerbread). Apps developed using future SDK releases after 10.0.x will not be able to connect to Google Play services on Android Gingerbread devices. To learn more about your options, including building multiple APKs to extend your app's support for Android Gingerbread, see the Android Developers Blog."
Phil
Upvotes: 0