javiersantos / AppUpdater

A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.
Apache License 2.0
1.98k stars 412 forks source link

Snack bar is not shown #155

Open iorfmer opened 5 years ago

iorfmer commented 5 years ago
Details
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); } })

            .setCancelable(false);

    appUpdater.start();

Changelog.json

{ "latestVersion": "1.3", "url": "xxxxxxxx" }

Reproduction Steps
  1. Current version is 1.2, set in build.gradle
  2. Updater is in the main view
  3. 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.

Many thanks for your work.