Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silent unattended remote Android application update?

Tags:

android

My friend's app will be preinstalled on ~60,000 Android devices. We'd like the devices to download and install a newer version of the app when it becomes available on our web site (we'll post the .apk file).

The application would not be published in the Market. It's an in-house business app.

I looked for similar questions and found https://stackoverflow.com/a/1662032 from 2009 and https://stackoverflow.com/a/4264819 from 2010 which recommend distributing a new firmware with the newer version of the app. Is that still the best option in 2014? We are looking for a completely unattended fully automatic software update with as little downtime as possible.

I'm exploring using CFEngine, as I'm familiar with CFEngine and dynamic reconfiguration is within its purview and capability, but I'm also checking for an Android “native” solution.

https://stackoverflow.com/a/2585448 describes downloading the APK but the next step requires human interaction to click the APK in the download manager to install it. We are looking for a completely unattended installation.

I also came across GCM (http://developer.android.com/google/gcm/index.html) but our devices will be on internal networks, behind firewalls, which is why we want them to pull down updates, rather than us pushing updates to them (which I think GCM would facilitate as it allows a fabric for sending messages to devices).

We can't reach the devices by push, but they can pull from our web server.

The most promising answer seems to be https://stackoverflow.com/a/12274740/3371843 which describes how to programmatically download and install an APK but it still requires user interaction for security except when done through Google Play? We won't be on Google Play.

With the continued growth of Android and adoption of Android for business, I'm sure this question will come up for others. Would appreciate any help you can offer.

like image 598
atsaloli Avatar asked Mar 02 '14 22:03

atsaloli


2 Answers

We are looking for a completely unattended fully automatic software update with as little downtime as possible.

That is not possible from an ordinary SDK application. Upgrading an application requires user intervention.

The makers of a firmware can offer automatic updates of apps, the way that Play Store-equipped firmwares do for Play Store apps that do not add new permissions.

which is why we want them to pull down updates, rather than us pushing updates to them (which I think GCM would facilitate as it allows a fabric for sending messages to devices)

Unless your APK files, when encoded in JSON, are less than 4K, GCM would not be much use, other than as a trigger mechanism to indicate that something is available for download.

like image 188
CommonsWare Avatar answered Oct 21 '22 05:10

CommonsWare


Did you get any solution? I am facing same issue with my app (silent update), I found a solution to silently check updated version and download silently, by using following library:

https://github.com/RaghavSood/AppaholicsUpdateChecker

It is close, but still it asks for user permission before upgrade . I would like to see a (non-rooted) solution for by passing user permissions.

like image 33
FHDFRD Avatar answered Oct 21 '22 07:10

FHDFRD