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

Dialog don't pop up when including latestVersionCode (JSON) #85

Closed yofu1234 closed 7 years ago

yofu1234 commented 7 years ago

In the new 2.6 version:

{
  "latestVersion": "1.2.2",
  "latestVersionCode": 10,
  "url": "https://github.com/javiersantos/AppUpdater/releases",
  "releaseNotes": [
    "- First evolution",
    "- Second evolution",
    "- Bug fixes"
  ]
}

If you don't include latestVersionCode in your JSON, the update dialog won't pop up.

javiersantos commented 7 years ago

Update 2.6.1 should fix this issue: https://github.com/javiersantos/AppUpdater/releases/tag/2.6.1

yofu1234 commented 7 years ago

Ok, this is weird. After the latest update the dialog just doesn't show up at all: https://github.com/yofu1234/androidappupdate/blob/master/update-changelog.json

javiersantos commented 7 years ago

Your JSON is mal-formatted. If you see the Android log there is a message like this:

E/AppUpdater: The JSON updater file is mal-formatted. AppUpdate can't check for updates.

You need to remove the comma (,) of the last releaseNotes item.

Your JSON:


{
  "latestVersion": "2.17",
      "latestVersionCode": 47,
  "url": "https://play.google.com/store/apps/details?id=com.stackkedteam.feedshare",
  "releaseNotes": [
    "1. Added GOING button. Hit GOING to tell the poster you are going & get notified whenever someone comments on the post",
  ]
}

The right one:

{
  "latestVersion": "2.17",
      "latestVersionCode": 47,
  "url": "https://play.google.com/store/apps/details?id=com.stackkedteam.feedshare",
  "releaseNotes": [
    "1. Added GOING button. Hit GOING to tell the poster you are going & get notified whenever someone comments on the post"
  ]
}
yofu1234 commented 7 years ago

Thanks, works now!