Closed enwokoma closed 5 years ago
No need, I have fixed the problem... Issue was that, I needed to call an if statement to check if the JSON versionCode is higher than the versionCode of the installed app. So far, so good. It works
Here is the change I made in the onSuccess
callback
if (update.getLatestVersionCode() > BuildConfig.VERSION_CODE) {
// Show Update bottomSheet
} else {
// No Update
// TODO: Do something when no update
}
Details
2.x.x
7.1.1
LG
Nexus 5X
Builder
Reproduction Steps
Expected Result
The update notice bottomsheet should be shown only when the versionName and versionCode is higher from the versionName and versionCode of the installed apk
Actual Result
With the JSON above, I get the update notice. But, when I change the info in the JSON to match the same with the installed app. Something like:
I still get the Update Notice... Even when I have installed the updated version of the app (the latest), I still get the Update Notice every time. Irrespective of how I change the JSON versionName and versionCode, I still get the Update Notice Something is not correct with the check.