I’m building an app (android studio – java) for my several devices, the app won’t be on app store.
I want to be able to update the app remotely automatically.
I figured out how to check the version against a server, however I still don’t know how to automatically update the app whenever the is a new version.
Thanks a head!
2
Answers
Firstly, as you said, you need to check the latest version, online and locally.
Then you need to put the apk newest apk online
Finally, if the online version is ahead the local, you need to download the file and update the app.
The easiest way to do it is to use the ota_update package to download and update the app
I hope this solution is useful for you
First you have to store the latest version on the server side using API.
After that you have to compare the installed current app version to the server-side stored version if both are different and the current version lower than the server-side version at that time you have to perform the below code.
Use this DownloadController.kt class