Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-Update for (private) Android apps

I'm developing a non-public Android app, i.e. the app won't be available in the global Android Market. The app will be installed on a limited number of clients, e.g. by using an apk file. How can I enable an auto-update functionality in this app?

I see different potential options (I do not know if those are technically hard or even impossible to implement or if there are any existing functionalities that can be reused):

  • On each launch the app tests if a new version exists (by requesting a server), if so downloads the new apk and replaces itself with the new version.
  • Use (or develop?) a separated app or service that undertakes the update-check and replacement-process.
  • Use (or develop?) a private market app which has an auto-update option. This option is similar to the second one, but more generic: The market app would be connected to a repository, i.e. it would handle an arbitrary number of (private) apps.

I would prefer option one since the auto-update functionality is included in the app which needs less development efforts.

like image 709
janjonas Avatar asked Nov 29 '10 21:11

janjonas


People also ask

How do I turn on automatic updates on Android?

From your Home screen, tap the Application screen icon. Find and tap Settings > About phone/tablet > Software update > menu button (three vertical dots) > Settings. Tap Auto-update apps and select the relevant option.

How do I make my Android automatically update apps?

Tap Manage apps & device.Tap Manage, then find the app you want to update automatically. To open the app's "Details" page, tap the app. Turn on Enable auto update.


1 Answers

janjonas, in the company I work we had a similar problem with Windows Mobile 6.x, and we use pretty much the same solution pointed by EboMike:

enter image description here

The main app check if it's updated, against a WebService. It receives the current version & the URL from where download the new version, if necessary. The main app then start the Updater app, passing the URL, and quit.

The Updater do the download of the new program, via HTTP, showing to the user the % downloaded. The user can cancel the download anytime, in a controlled way, and the Updater can registry this cancellation.

Since the new app is downloaded, the Updater run the new app, and quit.

like image 71
tcbrazil Avatar answered Sep 30 '22 04:09

tcbrazil