androidxamarinapkandroid-install-apksideloading

Auto Updating Sideloaded Android App on Start


We have an Android app (.apk) published to a publicly accessible URL, any user who knows the URL can download and install the app.

The app is already installed on the relevant user phones and allowing sideload option from the settings is turned on.

How can I force the app, on start, to check for update and replace the existing app if found, then restart the app (to pick up the latest version)?

Is there a standard solution or a software package? Should I be thinking in a different way?

I am using Xamarin Forms, however, I am happy with Xamarin Android or any Java-based solution.


Solution

  • The way to go is HockeyApp. It´s a distribution system that does exactly what you are looking for. Besides, you get a useful crash logger and some statistics, etc. It´s free for 2 apps.

    Once you install and configure their SDK in your Android app, an activity will popup telling the user a new update is available if there is any. The user can install the new version with a button tap. Simple.

    The setup process involves installing a nuget package and write a few lines of code in your main Activity class.