UpdateCheck
when you publish new version android app,maybe you want all your application user update new version.
this process follow 4-steps:
-
check googleplay app version
-
check device app version
-
compare version
-
alert new version update!
How to use
- check googleplay app version
String store_version = MarketVersionChecker.getMarketVersion(getPackageName());
- check device app version
String device_version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
- compare version
if (store_version.compareTo(device_version) > 0) {
// need update
} else {
// no need update
}