plugin.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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.4.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. <config-file target="*-Info.plist" parent="UIBackgroundModes">
  28. <array>
  29. <string>remote-notification</string>
  30. </array>
  31. </config-file>
  32. <config-file target="*-Debug.plist" parent="aps-environment">
  33. <string>development</string>
  34. </config-file>
  35. <config-file target="*-Release.plist" parent="aps-environment">
  36. <string>production</string>
  37. </config-file>
  38. <header-file src="src/ios/Plugins/JPushDefine.h" />
  39. <header-file src="src/ios/Plugins/JPushPlugin.h" />
  40. <source-file src="src/ios/Plugins/JPushPlugin.m" />
  41. <header-file src="src/ios/Plugins/AppDelegate+JPush.h" />
  42. <source-file src="src/ios/Plugins/AppDelegate+JPush.m" />
  43. <header-file src="src/ios/lib/JPUSHService.h" />
  44. <source-file src="src/ios/lib/jpush-ios-3.1.0.a" framework="true" />
  45. <resource-file src="src/ios/JPushConfig.plist" />
  46. <framework src="CFNetwork.framework" weak="true" />
  47. <framework src="CoreFoundation.framework" weak="true" />
  48. <framework src="CoreTelephony.framework" weak="true" />
  49. <framework src="SystemConfiguration.framework" weak="true" />
  50. <framework src="CoreGraphics.framework" weak="true" />
  51. <framework src="Foundation.framework" weak="true" />
  52. <framework src="UIKit.framework" weak="true" />
  53. <framework src="Security.framework" weak="true" />
  54. <framework src="libz.tbd" weak="true" />
  55. <framework src="AdSupport.framework" weak="true" />
  56. <framework src="UserNotifications.framework" weak="true" />
  57. <framework src="libresolv.tbd" weak="true" />
  58. <config-file target="*JPushConfig.plist" parent="Appkey">
  59. <string>$APP_KEY</string>
  60. </config-file>
  61. </platform>
  62. <platform name="android">
  63. <config-file target="res/xml/config.xml" parent="/*">
  64. <feature name="JPushPlugin">
  65. <param name="android-package" value="cn.jiguang.cordova.push.JPushPlugin" />
  66. </feature>
  67. </config-file>
  68. <config-file target="AndroidManifest.xml" parent="/manifest" mode="merge">
  69. <!-- Required 一些系统要求的权限,如访问网络等 -->
  70. <permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"
  71. android:protectionLevel="signature" />
  72. <uses-permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE" />
  73. <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
  74. <uses-permission android:name="android.permission.INTERNET" />
  75. <uses-permission android:name="android.permission.WAKE_LOCK" />
  76. <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  77. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  78. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  79. <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  80. <uses-permission android:name="android.permission.VIBRATE" />
  81. <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
  82. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  83. <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  84. </config-file>
  85. <config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge">
  86. <!-- Required SDK核心功能 -->
  87. <activity android:name="cn.jpush.android.ui.PushActivity"
  88. android:theme="@android:style/Theme.Translucent.NoTitleBar"
  89. android:configChanges="orientation|keyboardHidden">
  90. <intent-filter>
  91. <action android:name="cn.jpush.android.ui.PushActivity" />
  92. <category android:name="android.intent.category.DEFAULT" />
  93. <category android:name="$PACKAGE_NAME" />
  94. </intent-filter>
  95. </activity>
  96. <!-- Rich push 核心功能 since 2.0.6 -->
  97. <activity android:name="cn.jpush.android.ui.PopWinActivity"
  98. android:theme="@style/MyDialogStyle"
  99. android:exported="false">
  100. </activity>
  101. <!-- Required SDK 核心功能 -->
  102. <service android:name="cn.jpush.android.service.DownloadService"
  103. android:enabled="true"
  104. android:exported="false">
  105. </service>
  106. <!-- Required SDK 核心功能-->
  107. <service android:name="cn.jpush.android.service.PushService"
  108. android:enabled="true"
  109. android:exported="false"
  110. android:process=":remote">
  111. <intent-filter>
  112. <action android:name="cn.jpush.android.intent.REGISTER" />
  113. <action android:name="cn.jpush.android.intent.REPORT" />
  114. <action android:name="cn.jpush.android.intent.PushService" />
  115. <action android:name="cn.jpush.android.intent.PUSH_TIME" />
  116. </intent-filter>
  117. </service>
  118. <!-- Required SDK核心功能-->
  119. <receiver android:name="cn.jpush.android.service.PushReceiver"
  120. android:enabled="true"
  121. android:exported="false">
  122. <intent-filter android:priority="1000">
  123. <!--Required 显示通知栏 -->
  124. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
  125. <category android:name="$PACKAGE_NAME" />
  126. </intent-filter>
  127. <intent-filter>
  128. <action android:name="android.intent.action.USER_PRESENT" />
  129. <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
  130. </intent-filter>
  131. <!-- Optional -->
  132. <intent-filter>
  133. <action android:name="android.intent.action.PACKAGE_ADDED" />
  134. <action android:name="android.intent.action.PACKAGE_REMOVED" />
  135. <data android:scheme="package" />
  136. </intent-filter>
  137. </receiver>
  138. <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的 JPush 服务相互拉起的功能。 -->
  139. <!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
  140. <service android:name="cn.jpush.android.service.DaemonService"
  141. android:enabled="true"
  142. android:exported="true">
  143. <intent-filter>
  144. <action android:name="cn.jpush.android.intent.DaemonService" />
  145. <category android:name="$PACKAGE_NAME" />
  146. </intent-filter>
  147. </service>
  148. <!-- 通知广播接收器 -->
  149. <receiver
  150. android:name="cn.jiguang.cordova.push.JPushReceiver"
  151. android:enabled="true">
  152. <intent-filter>
  153. <action android:name="cn.jpush.android.intent.REGISTRATION" />
  154. <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" />
  155. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" />
  156. <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
  157. <action android:name="cn.jpush.android.intent.CONNECTION" />
  158. <category android:name="$PACKAGE_NAME" />
  159. </intent-filter>
  160. </receiver>
  161. <!-- Required SDK核心功能-->
  162. <receiver
  163. android:name="cn.jpush.android.service.AlarmReceiver"
  164. android:exported="false" />
  165. <!-- since 3.0.9 Required SDK 核心功能-->
  166. <provider
  167. android:authorities="$PACKAGE_NAME.DataProvider"
  168. android:name="cn.jpush.android.service.DataProvider"
  169. android:exported="true" />
  170. <receiver android:name="cn.jiguang.cordova.push.JPushEventReceiver">
  171. <intent-filter>
  172. <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
  173. <category android:name="$PACKAGE_NAME" />
  174. </intent-filter>
  175. </receiver>
  176. <!-- Required. Enable it you can get statistics data with channel -->
  177. <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
  178. <meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" />
  179. </config-file>
  180. <lib-file src="src/android/libs/jpush-android-3.1.5.jar" />
  181. <source-file src="src/android/JPushReceiver.java" target-dir="app/src/main/java/cn/jiguang/cordova/push" />
  182. <source-file src="src/android/JPushPlugin.java" target-dir="app/src/main/java/cn/jiguang/cordova/push" />
  183. <source-file src="src/android/JPushEventReceiver.java" target-dir="app/src/main/java/cn/jiguang/cordova/push" />
  184. <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml"
  185. target="res/drawable/jpush_richpush_btn_selector.xml" />
  186. <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml"
  187. target="res/drawable/jpush_richpush_progressbar.xml" />
  188. <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png"
  189. target="res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png" />
  190. <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png"
  191. target="res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png" />
  192. <resource-file src="src/android/res/layout/jpush_popwin_layout.xml"
  193. target="res/layout/jpush_popwin_layout.xml" />
  194. <resource-file src="src/android/res/layout/jpush_webview_layout.xml"
  195. target="res/layout/jpush_webview_layout.xml" />
  196. <resource-file src="src/android/res/layout/test_notification_layout.xml"
  197. target="res/layout/test_notification_layout.xml" />
  198. <resource-file src="src/android/res/values/jpush_style.xml"
  199. target="res/values/jpush_style.xml" />
  200. </platform>
  201. </plugin>