forked from thaarok/cordova-plugin-kiosk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.xml
74 lines (59 loc) · 3.84 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-kiosk" version="0.2">
<name>Cordova Kiosk Mode</name>
<author>Jan Kalina</author>
<description>
Cordova plugin to create Cordova application with "kiosk mode".
App with this plugin can be set as Android launcher.
If app starts as launcher, it will block hardware buttons and statusbar,
which would allow escape from application.
Escape from app will be possible only by javascript call KioskPlugin.exitKiosk()
or by uninstallation app using adb. (Keeping USB debug allowed recommended.)
If applications starts as usual (not as launcher), no restrictions will be applied.
Plugin website: https://github.com/honza889/cordova-plugin-kiosk
Example app: https://github.com/honza889/cordova-kiosk-demo
This plugin is for Android for now. Support of iOS would be useless,
becase this feature is builded in iOS as Guided Access.
</description>
<keywords>cordova, launcher, homescreen, kiosk, kiosk mode</keywords>
<engines>
<engine name="cordova" version=">=3.0.0" />
</engines>
<js-module src="kiosk.js" name="kioskPlugin">
<clobbers target="window.KioskPlugin" />
</js-module>
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="KioskPlugin">
<param name="android-package" value="jk.cordova.plugin.kiosk.KioskPlugin" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<!-- activity to use as launcher - because Cordova app is failing if started while boot -->
<activity android:label="TinyMobileRobots Home" android:launchMode="singleTop" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:keepScreenOn="true" android:name="jk.cordova.plugin.kiosk.HomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" /><!-- Handler of app icon (required to be launcher) -->
<category android:name="android.intent.category.HOME" /><!-- Handler of Home button -->
</intent-filter>
</activity>
<!-- inner activity, replacement of MainActivity with buttons blocked -->
<activity android:label="TinyMobileRobots App" android:launchMode="singleTask" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:keepScreenOn="true" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|uiMode" android:windowSoftInputMode="adjustResize" android:name="jk.cordova.plugin.kiosk.KioskActivity">
</activity>
<!-- autorun after the app APK is updated -->
<receiver android:name="jk.cordova.plugin.kiosk.MyPackageReplacedEventReceiver">
<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.REORDER_TASKS"/>
</config-file>
<source-file src="android/HomeActivity.java" target-dir="src/jk/cordova/plugin/kiosk" />
<source-file src="android/KioskActivity.java" target-dir="src/jk/cordova/plugin/kiosk" />
<source-file src="android/KioskPlugin.java" target-dir="src/jk/cordova/plugin/kiosk" />
<source-file src="android/MyPackageReplacedEventReceiver.java" target-dir="src/jk/cordova/plugin/kiosk" />
</platform>
</plugin>