Попробуйте это:
private boolean compareVersion(String currrentsVersion, String officialVersion) {
isEqual = false;
String[] string1 = currrentsVersion.split("[.]");
String[] string2 = officialVersion.split("[.]");
Integer[] number2 = new Integer[string2.length];
Integer[] numbers = new Integer[string2.length];
for (int i = 0; i < string2.length; i++) {
if (string1.length-1<i)
numbers[i] = 0;
else
numbers[i] = Integer.parseInt(string1[i]);
System.out.println("number1 ::: " + numbers[i]);
}
for (int i = 0; i < string2.length; i++) {
number2[i] = Integer.parseInt(string2[i]);
System.out.println("number2 ::: " + number2[i]);
}
for (int i = 0; i < number2.length; i++) {
if (number2[i] > numbers[i]) {
isEqual = false;
break;
} else {
isEqual = true;
}
}
return isEqual;
}
Вызовите этот метод для сравнения версии.
if (compareVersion(getVersionInfo(), officialVersion))
tvUpdateStatus.setText("Have the latest version installed :) ");
else
tvUpdateStatus.setText("Plz Update the Application");
Надеюсь, это поможет. ;)