Install, update app without playstore from own server

Hi!

I want to create a private app thats placed on our own server. How can i make it to update itself?
I think Activitystarter can do some install, but dont know how, and if it is true for the app itself. Also question, how can i make it to notice if there is update available?

When the update is out you can do these things: -

  • Download the latest updated version and install manually

  • Its difficult to make auto update but not impossible, you need to have much experience to do that

See here:

Thank you Anke, it is a very nice extension, but i dont want to use google drive, and google sheet. We have a webserver and i want to update from there.
I can make a version check in the apk, by a simple HTTP GET, but don't know how to make the auto update.
I think i've seen somewhere you mentioned some 3th party apk updater, but i cant find it now. Maybe that can make the work?
If nothing is work then i open the download link in a browser window and download and install it manually, but i would like to avoid that.

You could simply use the extension workflow as a guide, and apply some php to your server to provide the same thing. You might want to use a php tinywebDB to store the data.

Sorry Tim, but i don't understand what you are suggesting. Or more of i understand, but i don't know, how to make the update process. I dont have problem to make some version code on the server, and check that, but the update process was called by the extension isnt it? At least i don't see any other thing in the example aia.So how to make that process. I don't even know what it is doing, because update button is only available if there is an update available. Maybe it is only download the apk? I don't want to make a google sheet to try it out.

"Something" like this:

your php file on the server would do "something" like this:

"pseudo code"

<?php
1 get value of "versionCode"
2 open your file with the latest versionCode number in it
3 check if the file number is greater than the number sent
4 if it is then return the latest number and the url (as the responseContent)
?>

You keep the versionCode file on your server updated with the latest number
You keep the latest apk name the same for ease of use

Link to Anke's extension:

You can get the versionCode from a built app using Taifun's Tools extension
https://puravidaapps.com/tools.php

4 Likes

Herewith an example php file:

<?php
if(isset($_GET['version'])){
	$version = $_GET['version'];
}

$currentVersion = file_get_contents('/var/www/html/version.txt');

if ( $currentVersion > $version ) {

echo $currentVersion.","."http://localhost/apk/myApp.apk";

} else {

echo "You have the latest version";

}
?>

The file version.txt would simply contain a number. (in this example - 3)

An example url would be:

http://localhost:8080/getVersion.php?version=2

which would return:

3,http://localhost/apk/myApp.apk

(you would need to make this into a list in the app)

As i said, i dont have problem with version checking, but thank you very much for the php example. The install part was my main problem, and maybe autoupdate, but thats not so important. This extension looks good. I will test it. Thank you very musch for all.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.