This library is based on kazu0620’s SRGVersionUpdater which is iOS library. (https://github.com/kazu0620/SRGVersionUpdater)
- if user cancel latest update,
MSBVersionUpdater
doesn't show again alert dialog unless required_version becomes latest.(When type isoptional
) MSBVersionUpdater
deals with the problem which user skips force update,
{"last_force_required_version":"1.0.0","required_version":"1.1.0","type":"optional","update_url":"https://play.google.com/store/apps/details?id=misyobun.com.regardstoblackjack"}
key | define |
---|---|
last_force_required_version | Last force required_version. |
required_version | The version of latest client application. |
type | The type of update, “force” or “optional”. |
update_url | Google Play URL of your app. |
repositories {
jcenter()
}
dependencies {
compile 'jp.co.misyobun.lib.versionupdater:versionupdater:1.1.0'
}
@Override
public void onResume() {
super.onResume();
MSBVersionUpdater updater = new MSBVersionUpdater(this);
updater.setEndpoint([json url]);
updater.executeVersionCheck();
}
@Override
public void onResume() {
super.onResume();
MSBVersionUpdater updater = new MSBVersionUpdater(this);
updater.setEndpoint([json url]);
updater.setTitle([forceTitle]);
updater.setMessage([forceMessage]);
updater.executeVersionCheck();
}
@Override
public void onResume() {
super.onResume();
MSBVersionUpdater updater = new MSBVersionUpdater(this);
updater.setEndpoint([json url]);
updater.setForceTitle([forceTitle]);
updater.setForceMessage([forceMessage]);
updater.executeVersionCheck();
}