I recently saw a lot of posts about ’ how to update app automatically ’ or ’ best method to show new update '.
So I think to create a Guide on this.I do no know whether it is useful or not but I think it is good to share some knowledge. Components
You will need some components before getting started.I have used:
Button
Label
Notifier
Custom Tab
Package
Firebase Database
Note:- You can also make your app without some of these components but then you have to use your own logic. How it looks from designer
When Firebase Database got value it compares value to version.If value is greater than app version than it will show a choose dialog else it will show an alert.
After choosing an option it will check if user clicked on update or cancel.If user clicked on update than it will open the set URL else it will show dialog again and again until user clicks Update.
Why Firebase DB?
As we know there is already a component named Firebase Remote Config so your first choice should be that.
But we can not update data of it using an app.We have to open Firebase Console to update data.That’s why I have used Firebase DB to keep it simple and flexible and it can be upated from an app.
Also I want to say thank you to @mahando754 for pointing out that download link is not working.
Hope this helps!
From firebase.
Take an example.
Say your one user has version 1.1 but latest version is 1.2 (set in firebase) then it will show a notification that new version/update is available.
Here is a simplest method:
upload your app to an android store (say kodular store)
make new version of app with new version code and version name
update it on store
update version in firebase
check for update
Now if user has latest version(installed from store) then it will not show any notification else it will.
Can we achieve this when apk not uploaded to official app stores,suppose if i upload my apk on my host and can i use this to update the app ? If we can achieve what should be the changes i have to make ?
It will be within the app by Chrome Custom Tab.
But it can be customized and/or replaced with Download and Web components (if you have a direct download link) or Web Viewer (if you have no direct download link)
You can upload app/apk to any website which provides an link to your app.
I recommend using Kodular Store if you have no Developer Account on PlayStore.
Use this above block in your app, then go to your database and create Tag and a value, the tag can be any name but let the value be the same with your app version name, eg 1.0,. Like this