AppUpdater appUpdater = new AppUpdater(this)
.setDisplay(Display.SNACKBAR)
.setDuration(Duration.INDEFINITE)
.setUpdateFrom(UpdateFrom.JSON)
.setUpdateJSON("http://xxxxxxxx")
.showEvery(5)
.setTitleOnUpdateAvailable("Update available")
.setContentOnUpdateAvailable("Check out the latest version available of ")
.setTitleOnUpdateNotAvailable("Update not available")
.setContentOnUpdateNotAvailable("No update available. Check for updates again later!")
.setButtonUpdate("Update")
.setButtonUpdateClickListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("xxxxxxx"));
startActivity(browserIntent);
}
})
.setCancelable(false);
appUpdater.start();
Changelog.json
{
"latestVersion": "1.3",
"url": "xxxxxxxx"
}
Reproduction Steps
Current version is 1.2, set in build.gradle
Updater is in the main view
JSON has 1.3 as new version available
Expected Result
Update snack bar expeccted to be shown.
Actual Result
No snackbar is shown. In the console I saw library trying to open JSON url.
Is there any debug mode? Any console messages to trace?
It would be nice to have an error listener to detect errros.
Details
2.x.x
Builder
AppUpdater appUpdater = new AppUpdater(this) .setDisplay(Display.SNACKBAR) .setDuration(Duration.INDEFINITE) .setUpdateFrom(UpdateFrom.JSON) .setUpdateJSON("http://xxxxxxxx") .showEvery(5) .setTitleOnUpdateAvailable("Update available") .setContentOnUpdateAvailable("Check out the latest version available of ") .setTitleOnUpdateNotAvailable("Update not available") .setContentOnUpdateNotAvailable("No update available. Check for updates again later!") .setButtonUpdate("Update") .setButtonUpdateClickListener(new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("xxxxxxx")); startActivity(browserIntent); } })
Changelog.json
{ "latestVersion": "1.3", "url": "xxxxxxxx" }
Reproduction Steps
Expected Result
Update snack bar expeccted to be shown.
Actual Result
No snackbar is shown. In the console I saw library trying to open JSON url.
Is there any debug mode? Any console messages to trace?
It would be nice to have an error listener to detect errros.
Many thanks for your work.