plugin.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
  3. id="cordova-plugin-semsx-launcher"
  4. version="1.0.0">
  5. <name>Hello Kotlin</name>
  6. <engines>
  7. <engine name="cordova" version=">=7.1.0"/>
  8. <engine name="cordova-android" version=">=7.0.0"/>
  9. </engines>
  10. <author email="young91@vip.qq.com">Young</author>
  11. <platform name="android"
  12. kotlin="1.2.30">
  13. <!-- Add Kotlin support -->
  14. <hook type="after_plugin_add" src="hooks/support-kotlin.js" />
  15. <hook type="after_platform_add" src="hooks/support-kotlin.js" />
  16. <framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.31" />
  17. <apply-plugin>kotlin-android-extensions</apply-plugin>
  18. <apply-plugin>kotlin-kapt</apply-plugin>
  19. <!-- Cleanup Kotlin source on uninstall -->
  20. <hook type="before_plugin_rm" src="hooks/on-uninstall.js" />
  21. <hook type="before_plugin_uninstall" src="hooks/on-uninstall.js" />
  22. <config-file target="config.xml" parent="/*">
  23. <custom-preference delete="true" name="android-manifest/application/activity[@android:name='MainActivity']" />
  24. </config-file>
  25. <config-file target="res/values/strings.xml" parent="/*">
  26. <string name="check_window">Lock Window</string>
  27. </config-file>
  28. <config-file parent="/manifest/application" target="AndroidManifest.xml">
  29. <service
  30. android:name="com.semsx.android.home.locker.CheckWindowStateService"
  31. android:enabled="true"
  32. android:exported="true"
  33. android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" >
  34. <intent-filter>
  35. <action android:name="android.accessibilityservice.AccessibilityService" />
  36. </intent-filter>
  37. <meta-data
  38. android:name="android.accessibilityservice"
  39. android:resource="@xml/check_window_state"/>
  40. </service>
  41. </config-file>
  42. <source-file src="src/android/CheckWindowStateService.kt" target-dir="app/src/main/java/com/semsx/android/home/locker"/>
  43. <source-file src="src/android/check_window_state.xml" target-dir="app/src/main/res/xml"/>
  44. </platform>
  45. </plugin>