Skip to content

Commit

Permalink
Merge pull request #449 from hth/notify-delay
Browse files Browse the repository at this point in the history
increase app version support for android
  • Loading branch information
hth authored Jan 26, 2018
2 parents bd4d996 + 4a62ed5 commit a5091ab
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum LowestSupportedAppEnum {


VA("1.0.89", //Oldest App Version in String
108, //Oldest App Version as int
1089, //Oldest App Version as int
DeviceTypeEnum.A, //Device Type
"1.0.89"); //Latest App Version

Expand Down Expand Up @@ -59,7 +59,15 @@ public String getLatestAppVersion() {
}

public static boolean isSupportedVersion(LowestSupportedAppEnum lowestSupportedApp, int appVersionNumber) {
int shortenedAppVersionNumber = Integer.valueOf(String.valueOf(Math.abs((long) appVersionNumber)).substring(0, 3));
int shortenedAppVersionNumber = 0;
switch (lowestSupportedApp.deviceType) {
case A:
shortenedAppVersionNumber = appVersionNumber;
break;
case I:
shortenedAppVersionNumber = Integer.valueOf(String.valueOf(Math.abs((long) appVersionNumber)).substring(0, 3));
break;
}
LOG.info("App Version={} device={} and shortenedAppVersionNumber={}",
appVersionNumber,
lowestSupportedApp.deviceType,
Expand Down

0 comments on commit a5091ab

Please sign in to comment.