This Cordova plugin will start automatically your Android app after the every boot or the auto-update of your application. You can enable or disable the autostart function in your app. The plugin is also compatible with PhoneGap Build.
- Android
cordova.plugins.autoStart.enable();
This is the default action if you have never called the "enable" function.
cordova.plugins.autoStart.disable();
The plugin can either be installed from git repository, from local file system through the Command-line Interface or cloud based through PhoneGap Build.
From master:
# ~~ from master branch ~~
cordova plugin add https://github.com/ToniKorin/cordova-plugin-autostart.git
from a local folder:
# ~~ local folder ~~
cordova plugin add cordova-plugin-autostart --searchpath path
or to use the latest stable version:
# ~~ stable version ~~
cordova plugin add cordova-plugin-autostart@2.0.1
To remove the plug-in, run the following command:
cordova plugin rm cordova-plugin-autostart
Add the following xml line to your config.xml:
<gap:plugin platform="android" name="cordova-plugin-autostart" version="2.0.1" source="npm"/>
- Installation to the SD card will prevent the automatic start of your app after the boot. See more details from here.
- During the boot your app may start before it has no network connectivity. Your app have to take care of it e.g. using the cordova-plugin-network-information.
Check the Change Log.
This software is released under the Apache 2.0 License.
© 2015 Toni Korin