Paweł Laskowski
Paweł Laskowski

Reputation: 185

Updating android app not listed on play store?

For a customer of mine, we have developed an app which is provided with a tablet as a default launcher. Now every so often we want to update the app - preferably without access to the tablet - so pretty much remotely. The app is not listed on play store, it's being installed as a .apk file by us in-house on the tablet and then sent to the customer.

How do I go about being able to force updates to it? App has internet connectivity, it's written in Cordova or Android native (we have 2 apps).

Upvotes: 1

Views: 529

Answers (1)

Really Nice Code
Really Nice Code

Reputation: 1334

You can use the cordova File plugin to gain access and permission to write files to disk, then include a function that checks a value on your server to determine if the app is up to date or not. If the app is not running the current version... then your app can call a function that downloads the updated app pages/scripts and saves them locally.

To be safe, i would recommend implementing a dynamic splash screen (of your own) that checks to see if there are any downloaded update-files to be transferred to the active app directory.

So the next time the app starts, the splash screen will just stay up a little longer and let the user know that an update is in progress... whilst your update function copy, edit and replace the files in the background.

This is something you should test thoroughly before shipping as it can sometimes break your application if the app is suspended during a file write.

You can read more about the cordova file plugin here: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/

Upvotes: 1

Related Questions