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.4.3'
}
public override fun onResume() {
super.onResume()
val updater = MSBVersionUpdater(this)
updater.endpoint = "[json url]"
updater.executeVersionCheck()
}
public override fun onResume() {
super.onResume()
val updater = MSBVersionUpdater(this)
updater.endpoint = "[json url]"
updater.title = "[title]" // Notice
updater.message = "[message]" // Yout can update new version!
updater.executeVersionCheck()
}
public override fun onResume() {
super.onResume()
val updater = MSBVersionUpdater(this)
updater.endpoint = "[json url]"
updater.forceTitle = "[forceTitle]" // App updates
updater.forceMessage = "[forceMessage]" // You can update latest app version. If you keep the old version , app might crash while you are using.
updater.executeVersionCheck()
}
public override fun onResume() {
super.onResume()
val updater = MSBVersionUpdater(this)
updater.endpoint = "[json url]"
updater.title = "[title]" // Notice
updater.message = "[message]" // Yout can update new version!
updater.positiveButtonText = "[positiveButtonText]" // OK!!
updater.negativeButtonText = "[negativeButtonText]" // CANCEL!!
updater.executeVersionCheck()
}