plugin.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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.5.1">
  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.1.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.READ_PHONE_STATE" />
  76. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  77. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  78. <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
  79. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  80. <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  81. <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  82. <uses-permission android:name="android.permission.VIBRATE" />
  83. <uses-permission android:name="android.permission.WAKE_LOCK" />
  84. </config-file>
  85. <config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge">
  86. <!-- Required SDK 核心功能-->
  87. <service android:name="cn.jpush.android.service.PushService"
  88. android:enabled="true"
  89. android:exported="false"
  90. android:process=":remote">
  91. <intent-filter>
  92. <action android:name="cn.jpush.android.intent.REGISTER" />
  93. <action android:name="cn.jpush.android.intent.REPORT" />
  94. <action android:name="cn.jpush.android.intent.PushService" />
  95. <action android:name="cn.jpush.android.intent.PUSH_TIME" />
  96. </intent-filter>
  97. </service>
  98. <!-- since 3.0.9 Required SDK 核心功能-->
  99. <provider
  100. android:authorities="$PACKAGE_NAME.DataProvider"
  101. android:name="cn.jpush.android.service.DataProvider"
  102. android:exported="true" />
  103. <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的 JPush 服务相互拉起的功能。 -->
  104. <!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
  105. <service android:name="cn.jpush.android.service.DaemonService"
  106. android:enabled="true"
  107. android:exported="true">
  108. <intent-filter>
  109. <action android:name="cn.jpush.android.intent.DaemonService" />
  110. <category android:name="$PACKAGE_NAME" />
  111. </intent-filter>
  112. </service>
  113. <!-- since 3.1.0 Required SDK 核心功能-->
  114. <provider
  115. android:authorities="$PACKAGE_NAME.DownloadProvider"
  116. android:name="cn.jpush.android.service.DownloadProvider"
  117. android:exported="true"
  118. />
  119. <!-- Required SDK核心功能-->
  120. <receiver android:name="cn.jpush.android.service.PushReceiver"
  121. android:enabled="true">
  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. <!-- Required SDK核心功能 -->
  139. <activity android:name="cn.jpush.android.ui.PushActivity"
  140. android:theme="@android:style/Theme.Translucent.NoTitleBar"
  141. android:configChanges="orientation|keyboardHidden"
  142. android:exported="false" >
  143. <intent-filter>
  144. <action android:name="cn.jpush.android.ui.PushActivity" />
  145. <category android:name="android.intent.category.DEFAULT" />
  146. <category android:name="$PACKAGE_NAME" />
  147. </intent-filter>
  148. </activity>
  149. <!-- SDK 核心功能-->
  150. <activity
  151. android:name="cn.jpush.android.ui.PopWinActivity"
  152. android:configChanges="orientation|keyboardHidden"
  153. android:exported="false"
  154. android:theme="@style/MyDialogStyle">
  155. <intent-filter>
  156. <category android:name="android.intent.category.DEFAULT" />
  157. <category android:name="$PACKAGE_NAME" />
  158. </intent-filter>
  159. </activity>
  160. <!-- Required SDK 核心功能 -->
  161. <service android:name="cn.jpush.android.service.DownloadService"
  162. android:enabled="true"
  163. android:exported="false">
  164. </service>
  165. <!-- Required SDK核心功能-->
  166. <receiver android:name="cn.jpush.android.service.AlarmReceiver" />
  167. <receiver android:name="cn.jiguang.cordova.push.JPushEventReceiver">
  168. <intent-filter>
  169. <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
  170. <category android:name="$PACKAGE_NAME" />
  171. </intent-filter>
  172. </receiver>
  173. <!-- 插件通知广播接收器 -->
  174. <receiver
  175. android:name="cn.jiguang.cordova.push.JPushReceiver"
  176. android:enabled="true">
  177. <intent-filter>
  178. <action android:name="cn.jpush.android.intent.REGISTRATION" />
  179. <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" />
  180. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" />
  181. <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
  182. <action android:name="cn.jpush.android.intent.CONNECTION" />
  183. <category android:name="$PACKAGE_NAME" />
  184. </intent-filter>
  185. </receiver>
  186. <!-- Required. Enable it you can get statistics data with channel -->
  187. <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
  188. <meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" />
  189. </config-file>
  190. <lib-file src="src/android/libs/jpush-android-3.1.7.jar" />
  191. <source-file src="src/android/JPushReceiver.java" target-dir="src/cn/jiguang/cordova/push" />
  192. <source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />
  193. <source-file src="src/android/JPushEventReceiver.java" target-dir="src/cn/jiguang/cordova/push" />
  194. <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml"
  195. target="res/drawable/jpush_richpush_btn_selector.xml" />
  196. <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml"
  197. target="res/drawable/jpush_richpush_progressbar.xml" />
  198. <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png"
  199. target="res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png" />
  200. <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png"
  201. target="res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png" />
  202. <resource-file src="src/android/res/layout/jpush_popwin_layout.xml"
  203. target="res/layout/jpush_popwin_layout.xml" />
  204. <resource-file src="src/android/res/layout/jpush_webview_layout.xml"
  205. target="res/layout/jpush_webview_layout.xml" />
  206. <resource-file src="src/android/res/layout/test_notification_layout.xml"
  207. target="res/layout/test_notification_layout.xml" />
  208. <resource-file src="src/android/res/values/jpush_style.xml"
  209. target="res/values/jpush_style.xml" />
  210. </platform>
  211. </plugin>