UNPKG

cordova-plugin-autostarter

Version:

The application will be automatically started after the every boot and the automatic update of your application. You can enable or disable the autostart function in your app.

87 lines (71 loc) 3.59 kB
<?xml version="1.0" encoding="UTF-8" ?> <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-autostarter" version="1.2.1"> <name>Autostart</name> <description> The application will be automatically started after the every boot and the automatic update of your application. You can enable or disable the autostart function in your app. </description> <keywords>autostart</keywords> <repo>https://github.com/ToniKorin/cordova-plugin-autostart</repo> <license>Apache 2.0</license> <author>Toni Korin</author> <engines> <engine name="cordova" version=">=3.0.0" /> </engines> <!-- js --> <js-module src="www/auto-start.js" name="AutoStart"> <clobbers target="cordova.plugins.autoStart" /> </js-module> <!-- android --> <platform name="android"> <config-file target="res/xml/config.xml" parent="/*"> <feature name="AutoStart" > <param name="android-package" value="com.tonikorin.cordova.plugin.autostart.AutoStart"/> </feature> </config-file> <config-file target="AndroidManifest.xml" parent="/manifest/application"> <receiver android:name="com.tonikorin.cordova.plugin.autostart.BootCompletedReceiver" android:enabled="false"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> <receiver android:name="com.tonikorin.cordova.plugin.autostart.UserPresentReceiver" android:enabled="false"> <intent-filter> <action android:name="android.intent.action.USER_PRESENT" /> </intent-filter> </receiver> <receiver android:name="com.tonikorin.cordova.plugin.autostart.PackageReplacedReceiver" android:enabled="true"> <intent-filter> <action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> </intent-filter> </receiver> </config-file> <config-file target="AndroidManifest.xml" parent="/manifest"> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> </config-file> <source-file src="src/android/BootCompletedReceiver.java" target-dir="src/com/tonikorin/cordova/plugin/autostart" /> <source-file src="src/android/UserPresentReceiver.java" target-dir="src/com/tonikorin/cordova/plugin/autostart" /> <source-file src="src/android/PackageReplacedReceiver.java" target-dir="src/com/tonikorin/cordova/plugin/autostart" /> <source-file src="src/android/AppStarter.java" target-dir="src/com/tonikorin/cordova/plugin/autostart" /> <source-file src="src/android/AutoStart.java" target-dir="src/com/tonikorin/cordova/plugin/autostart" /> </platform> <!-- macOS --> <platform name="osx"> <config-file target="config.xml" parent="/*"> <feature name="AutoStart"> <param name="ios-package" value="AutoStart" /> <param name="onload" value="true" /> </feature> </config-file> <source-file src="src/osx/Autostart.swift" /> <framework src="ServiceManagement.framework" /> <dependency id="cordova-plugin-swift-support" version="~3.1.1"/> </platform> </plugin>