plugin.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. id="jpush-phonegap-plugin"
  5. version="3.2.3">
  6. <name>JPush</name>
  7. <description>JPush for cordova plugin</description>
  8. <author>JPush</author>
  9. <keywords>JPush,push</keywords>
  10. <license>MIT License</license>
  11. <preference name="APP_KEY" />
  12. <engines>
  13. <engine name="cordova" version=">=3.0" />
  14. </engines>
  15. <!-- dependencies -->
  16. <dependency id="cordova-plugin-device" />
  17. <dependency id="cordova-plugin-jcore" />
  18. <js-module src="www/JPushPlugin.js" name="JPushPlugin">
  19. <clobbers target="JPush" />
  20. </js-module>
  21. <platform name="ios">
  22. <config-file target="config.xml" parent="/*">
  23. <feature name="JPushPlugin">
  24. <param name="ios-package" value="JPushPlugin" />
  25. </feature>
  26. </config-file>
  27. <header-file src="src/ios/Plugins/JPushDefine.h" />
  28. <header-file src="src/ios/Plugins/JPushPlugin.h" />
  29. <source-file src="src/ios/Plugins/JPushPlugin.m" />
  30. <header-file src="src/ios/Plugins/AppDelegate+JPush.h" />
  31. <source-file src="src/ios/Plugins/AppDelegate+JPush.m" />
  32. <header-file src="src/ios/lib/JPUSHService.h" />
  33. <source-file src="src/ios/lib/jpush-ios-3.0.6.a" framework="true" />
  34. <resource-file src="src/ios/JPushConfig.plist" />
  35. <framework src="CFNetwork.framework" weak="true" />
  36. <framework src="CoreFoundation.framework" weak="true" />
  37. <framework src="CoreTelephony.framework" weak="true" />
  38. <framework src="SystemConfiguration.framework" weak="true" />
  39. <framework src="CoreGraphics.framework" weak="true" />
  40. <framework src="Foundation.framework" weak="true" />
  41. <framework src="UIKit.framework" weak="true" />
  42. <framework src="Security.framework" weak="true" />
  43. <framework src="libz.tbd" weak="true" />
  44. <framework src="AdSupport.framework" weak="true" />
  45. <framework src="UserNotifications.framework" weak="true" />
  46. <framework src="libresolv.tbd" weak="true" />
  47. <config-file target="*JPushConfig.plist" parent="Appkey">
  48. <string>$APP_KEY</string>
  49. </config-file>
  50. <!-- <hook type="after_platform_add" src="hooks/iosEnablePush.js" />
  51. <hook type="after_plugin_install" src="hooks/iosEnablePush.js" />
  52. <hook type="before_plugin_uninstall" src="hooks/iosDisablePush.js" /> -->
  53. </platform>
  54. <platform name="android">
  55. <config-file target="res/xml/config.xml" parent="/*">
  56. <feature name="JPushPlugin">
  57. <param name="android-package" value="cn.jiguang.cordova.push.JPushPlugin" />
  58. </feature>
  59. </config-file>
  60. <config-file target="AndroidManifest.xml" parent="/manifest">
  61. <!-- Required 一些系统要求的权限,如访问网络等-->
  62. <uses-permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE" />
  63. <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
  64. <uses-permission android:name="android.permission.INTERNET" />
  65. <uses-permission android:name="android.permission.WAKE_LOCK" />
  66. <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  67. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  68. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  69. <uses-permission android:name="android.permission.VIBRATE" />
  70. <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
  71. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  72. <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
  73. <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  74. <permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"
  75. android:protectionLevel="signature" />
  76. </config-file>
  77. <config-file target="AndroidManifest.xml" parent="/manifest/application">
  78. <!-- Required SDK核心功能-->
  79. <activity android:name="cn.jpush.android.ui.PushActivity"
  80. android:theme="@android:style/Theme.Translucent.NoTitleBar"
  81. android:configChanges="orientation|keyboardHidden">
  82. <intent-filter>
  83. <action android:name="cn.jpush.android.ui.PushActivity" />
  84. <category android:name="android.intent.category.DEFAULT" />
  85. <category android:name="$PACKAGE_NAME" />
  86. </intent-filter>
  87. </activity>
  88. <!-- Rich push 核心功能 since 2.0.6-->
  89. <activity android:name="cn.jpush.android.ui.PopWinActivity"
  90. android:theme="@style/MyDialogStyle"
  91. android:exported="false">
  92. </activity>
  93. <!-- Required SDK核心功能-->
  94. <service android:name="cn.jpush.android.service.DownloadService"
  95. android:enabled="true"
  96. android:exported="false">
  97. </service>
  98. <!-- Required SDK 核心功能-->
  99. <service android:name="cn.jpush.android.service.PushService"
  100. android:enabled="true"
  101. android:exported="false"
  102. android:process=":remote">
  103. <intent-filter>
  104. <action android:name="cn.jpush.android.intent.REGISTER" />
  105. <action android:name="cn.jpush.android.intent.REPORT" />
  106. <action android:name="cn.jpush.android.intent.PushService" />
  107. <action android:name="cn.jpush.android.intent.PUSH_TIME" />
  108. </intent-filter>
  109. </service>
  110. <!-- Required SDK核心功能-->
  111. <receiver android:name="cn.jpush.android.service.PushReceiver"
  112. android:enabled="true"
  113. android:exported="false">
  114. <intent-filter android:priority="1000">
  115. <!--Required 显示通知栏 -->
  116. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
  117. <category android:name="$PACKAGE_NAME" />
  118. </intent-filter>
  119. <intent-filter>
  120. <action android:name="android.intent.action.USER_PRESENT" />
  121. <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
  122. </intent-filter>
  123. <!-- Optional -->
  124. <intent-filter>
  125. <action android:name="android.intent.action.PACKAGE_ADDED" />
  126. <action android:name="android.intent.action.PACKAGE_REMOVED" />
  127. <data android:scheme="package" />
  128. </intent-filter>
  129. </receiver>
  130. <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
  131. <!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
  132. <service android:name="cn.jpush.android.service.DaemonService"
  133. android:enabled="true"
  134. android:exported="true">
  135. <intent-filter>
  136. <action android:name="cn.jpush.android.intent.DaemonService" />
  137. <category android:name="$PACKAGE_NAME" />
  138. </intent-filter>
  139. </service>
  140. <!-- User defined. For test only 用户自定义的广播接收器 -->
  141. <receiver
  142. android:name="cn.jiguang.cordova.push.MyReceiver"
  143. android:enabled="true">
  144. <intent-filter android:priority="1000">
  145. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
  146. <!-- Required 显示通知栏 -->
  147. <category android:name="$PACKAGE_NAME" />
  148. </intent-filter>
  149. <intent-filter>
  150. <action android:name="cn.jpush.android.intent.REGISTRATION" />
  151. <!-- Required 用户注册SDK的intent -->
  152. <action android:name="cn.jpush.android.intent.UNREGISTRATION" />
  153. <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" />
  154. <!-- Required 用户接收SDK消息的intent -->
  155. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" />
  156. <!-- Required 用户接收SDK通知栏信息的intent -->
  157. <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
  158. <!-- Required 用户打开自定义通知栏的intent -->
  159. <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" />
  160. <!-- Optional 用户接受Rich Push Javascript 回调函数的intent -->
  161. <category android:name="$PACKAGE_NAME" />
  162. </intent-filter>
  163. </receiver>
  164. <!-- Required SDK核心功能-->
  165. <receiver
  166. android:name="cn.jpush.android.service.AlarmReceiver"
  167. android:exported="false" />
  168. <!-- Required. Enable it you can get statistics data with channel -->
  169. <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
  170. <meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" />
  171. </config-file>
  172. <source-file src="src/android/libs/jpush-android_v3.0.6.jar" target-dir="libs" />
  173. <source-file src="src/android/MyReceiver.java" target-dir="src/cn/jiguang/cordova/push" />
  174. <source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />
  175. <source-file src="src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml"
  176. target-dir="res/drawable" />
  177. <source-file src="src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml"
  178. target-dir="res/drawable" />
  179. <source-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png"
  180. target-dir="res/drawable-hdpi" />
  181. <source-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png"
  182. target-dir="res/drawable-hdpi" />
  183. <source-file src="src/android/res/layout/jpush_popwin_layout.xml" target-dir="res/layout" />
  184. <source-file src="src/android/res/layout/jpush_webview_layout.xml" target-dir="res/layout" />
  185. <source-file src="src/android/res/layout/test_notification_layout.xml" target-dir="res/layout" />
  186. <source-file src="src/android/res/values/jpush_style.xml" target-dir="res/values" />
  187. </platform>
  188. </plugin>