apk-updater

Express module for apk auto-updater

apk-updater

Android's apk automatic updater server module for Node.js with Express. This update server is an alternative to Google play server in order to completely manage the APK packages to offer.

See android-auto-updater-client for Android's client library.

Install with npm :

npm install apk-updater

Enables update server module.

  • app parent Express application (required)
  • route route prefix for current updater (required)
  • repoDir path for apk directory (optional)
var apkUpdater = require('apk-updater');
 
var app = express()
 
apkUpdater.enable(app, '/anyUpdateServerRoute');

This will enable both post GET and POST methods for '/anyUpdateServerRoute' in 'app' and will provide APK files found in './.apk_repo' directory.

In the above example the 'http://yourserver/anyUpdateServerRoute' URL will return the list of all available APK packages as a JSON list.

To change APK directory an extra parameter is needed during initialization. Eg.

enable(app, '/anyUpdateServerRoute', 'myDirectory');

See android-auto-updater-client for client implementation.

HTTP GET method returns a JSON list of all available packages.

HTTP POST method with 'pkgname' and 'version' parameters returns an auto-generated download URL if an update is available for the given package and version.