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

Latest version JSON #84

Closed yofu1234 closed 7 years ago

yofu1234 commented 7 years ago

for some reason the library has it that latestVersion integer you put in JSON has to be: latestVersion - 1

"latestVersion": "2.14",

I.E.: the latest version right now is 2.15. For the pop up to not show up on version 2.15. You have to put latest version as 2.14

Json here: https://github.com/yofu1234/androidappupdate/blob/master/update-changelog.json

javiersantos commented 7 years ago

I don't see the problem here.

When I use 2.15 as the versionName and upload this JSON to my server, I get "No updates available".

{
  "latestVersion": "2.15",
  "url": "https://play.google.com/store/apps/details?id=com.stackkedteam.feedshare",
  "releaseNotes": [
    "1. Added image compression so uploading images are now way faster.",
    "2. Moar Bug fixes"
  ]
}
yofu1234 commented 7 years ago

What does your code look like?

I'm not using
.setContentOnUpdateNotAvailable("No update available. Check for updates again later!") maybe that's why?

Here is my code:

` AppUpdater appUpdater = new AppUpdater(this) .setTitleOnUpdateAvailable("Important: Must Update") .setButtonUpdate("Update now!") .setButtonDismiss("Later") .setButtonDoNotShowAgain(null) .setIcon(R.mipmap.ic_launcher) .setUpdateFrom(UpdateFrom.JSON) .setUpdateJSON("https://raw.githubusercontent.com/yofu1234/androidappupdate/master/update-changelog.json");

appUpdater.start(); `

javiersantos commented 7 years ago

Is this issue fixed with the latest update and #85?

yofu1234 commented 7 years ago

Yup, the new update fixed the issue! Thanks!