Own update mechanism // Update without the market

I work on a project that uses an app which we do not need to upload to the Google Market. I would like to build in own update mechanism.
The application has a version, the server knows what current version is and the latest compatible version. If the current version number and the app version are not the same, the app offers to go to an “update_screen” or opens it automatically in case the app version is not compatible with the server any more.

The server provides an url string for a new apk.

What I would like to do is to download an apk to a user’s folder and run it to initiate an update process. I know that apk extension is considered dangerous, so downloading it with a different extension to rename it later, I guess, will not be a problem.
My question is how to run an apk-file, what permissions are required. And if it is possible at all?
I hope that using a webView to save and run an apk-file is not the only option.

Is this what you are looking for?

I would recommend that you first look into Patcher by roaminggamer as it offers much of the functionalities that you seem to need:

I’d also like to know why you want to bypass Google Play when delivering updates? I would advise against that as delivering updates via the official store is 1) free, as in you don’t pay for bandwidth, 2) effectively showing your potential players as well as Google that your app is being updated regularly, and 3) you don’t risk angering Google by accidentally breaking their tos.

1 Like

I am planning to use Google Store later, but as you can see I created post in “Business Apps” branch of the forum. It is not a game. During alpha-testing stage the app will be used by comparatively small group of people (100-200 users probably) who most likely will be reluctant to use manual updates through a messenger group, special webpage or any other method. That is why I would like to bypass the Market. If my thinking is wrong, I will learn how to use the Market then :slight_smile:

If I’m not mistaken, Clash Royale uses that.