qiaowei | aa6f1f6 | 2019-08-07 10:26:16 +0800 | [diff] [blame^] | 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.7.2"> |
| 6 | |
| 7 | <name>JPush</name> |
| 8 | <description>JPush for cordova plugin</description> |
| 9 | <author>JPush</author> |
| 10 | <keywords>JPush,push</keywords> |
| 11 | <license>MIT License</license> |
| 12 | |
| 13 | <preference name="APP_KEY" /> |
| 14 | <preference name="CHANNEL" default="developer-default" /> |
| 15 | |
| 16 | <engines> |
| 17 | <engine name="cordova" version=">=3.0" /> |
| 18 | </engines> |
| 19 | |
| 20 | <!-- dependencies --> |
| 21 | <dependency id="cordova-plugin-device" /> |
| 22 | <dependency id="cordova-plugin-jcore" /> |
| 23 | |
| 24 | <js-module src="www/JPushPlugin.js" name="JPushPlugin"> |
| 25 | <clobbers target="JPush" /> |
| 26 | </js-module> |
| 27 | |
| 28 | <platform name="ios"> |
| 29 | <config-file target="config.xml" parent="/*"> |
| 30 | <feature name="JPushPlugin"> |
| 31 | <param name="ios-package" value="JPushPlugin" /> |
| 32 | </feature> |
| 33 | </config-file> |
| 34 | <config-file target="*-Info.plist" parent="UIBackgroundModes"> |
| 35 | <array> |
| 36 | <string>remote-notification</string> |
| 37 | </array> |
| 38 | </config-file> |
| 39 | <config-file target="*-Debug.plist" parent="aps-environment"> |
| 40 | <string>development</string> |
| 41 | </config-file> |
| 42 | <config-file target="*-Release.plist" parent="aps-environment"> |
| 43 | <string>production</string> |
| 44 | </config-file> |
| 45 | <header-file src="src/ios/Plugins/JPushDefine.h" /> |
| 46 | <header-file src="src/ios/Plugins/JPushPlugin.h" /> |
| 47 | <source-file src="src/ios/Plugins/JPushPlugin.m" /> |
| 48 | <header-file src="src/ios/Plugins/AppDelegate+JPush.h" /> |
| 49 | <source-file src="src/ios/Plugins/AppDelegate+JPush.m" /> |
| 50 | |
| 51 | <header-file src="src/ios/lib/JPUSHService.h" /> |
| 52 | <source-file src="src/ios/lib/jpush-ios-3.2.1.a" framework="true" /> |
| 53 | <resource-file src="src/ios/JPushConfig.plist" /> |
| 54 | |
| 55 | <framework src="CFNetwork.framework" weak="true" /> |
| 56 | <framework src="CoreFoundation.framework" weak="true" /> |
| 57 | <framework src="CoreTelephony.framework" weak="true" /> |
| 58 | <framework src="SystemConfiguration.framework" weak="true" /> |
| 59 | <framework src="CoreGraphics.framework" weak="true" /> |
| 60 | <framework src="Foundation.framework" weak="true" /> |
| 61 | <framework src="UIKit.framework" weak="true" /> |
| 62 | <framework src="Security.framework" weak="true" /> |
| 63 | <framework src="libz.tbd" weak="true" /> |
| 64 | <framework src="AdSupport.framework" weak="true" /> |
| 65 | <framework src="UserNotifications.framework" weak="true" /> |
| 66 | <framework src="libresolv.tbd" weak="true" /> |
| 67 | |
| 68 | <config-file target="*JPushConfig.plist" parent="Appkey"> |
| 69 | <string>$APP_KEY</string> |
| 70 | </config-file> |
| 71 | </platform> |
| 72 | |
| 73 | <platform name="android"> |
| 74 | <config-file target="res/xml/config.xml" parent="/*"> |
| 75 | <feature name="JPushPlugin"> |
| 76 | <param name="android-package" value="cn.jiguang.cordova.push.JPushPlugin" /> |
| 77 | </feature> |
| 78 | </config-file> |
| 79 | |
| 80 | <config-file target="AndroidManifest.xml" parent="/manifest" mode="merge"> |
| 81 | <!-- Required 一些系统要求的权限,如访问网络等 --> |
| 82 | <permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE" |
| 83 | android:protectionLevel="signature" /> |
| 84 | |
| 85 | <!-- Required 一些系统要求的权限,如访问网络等--> |
| 86 | <uses-permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE" /> |
| 87 | <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> |
| 88 | <uses-permission android:name="android.permission.INTERNET" /> |
| 89 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
| 90 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| 91 | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
| 92 | <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> |
| 93 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 94 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> |
| 95 | |
| 96 | |
| 97 | |
| 98 | <!-- Optional for location --> |
| 99 | <uses-permission android:name="android.permission.VIBRATE" /> |
| 100 | <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 --> |
| 101 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| 102 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> |
| 103 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| 104 | <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /><!-- Android Q后台定位权限--> |
| 105 | <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> |
| 106 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> |
| 107 | <uses-permission android:name="android.permission.GET_TASKS" /> |
| 108 | </config-file> |
| 109 | |
| 110 | <config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge"> |
| 111 | |
| 112 | |
| 113 | <!-- Rich push 核心功能 since 2.0.6--> |
| 114 | <activity |
| 115 | android:name="cn.jpush.android.ui.PopWinActivity" |
| 116 | android:theme="@style/MyDialogStyle" |
| 117 | android:exported="false"> |
| 118 | </activity> |
| 119 | |
| 120 | <!-- Required SDK核心功能--> |
| 121 | <activity |
| 122 | android:name="cn.jpush.android.ui.PushActivity" |
| 123 | android:configChanges="orientation|keyboardHidden" |
| 124 | android:theme="@android:style/Theme.NoTitleBar" |
| 125 | android:exported="false"> |
| 126 | <intent-filter> |
| 127 | <action android:name="cn.jpush.android.ui.PushActivity" /> |
| 128 | <category android:name="android.intent.category.DEFAULT" /> |
| 129 | <category android:name="$PACKAGE_NAME" /> |
| 130 | </intent-filter> |
| 131 | </activity> |
| 132 | |
| 133 | <!-- Required SDK 核心功能--> |
| 134 | <!-- 可配置android:process参数将PushService放在其他进程中 --> |
| 135 | <service |
| 136 | android:name="cn.jpush.android.service.PushService" |
| 137 | android:process=":pushcore" |
| 138 | android:exported="false"> |
| 139 | <intent-filter> |
| 140 | <action android:name="cn.jpush.android.intent.REGISTER" /> |
| 141 | <action android:name="cn.jpush.android.intent.REPORT" /> |
| 142 | <action android:name="cn.jpush.android.intent.PushService" /> |
| 143 | <action android:name="cn.jpush.android.intent.PUSH_TIME" /> |
| 144 | </intent-filter> |
| 145 | </service> |
| 146 | |
| 147 | <!-- since 3.0.9 Required SDK 核心功能--> |
| 148 | <provider |
| 149 | android:authorities="$PACKAGE_NAME.DataProvider" |
| 150 | android:name="cn.jpush.android.service.DataProvider" |
| 151 | android:process=":pushcore" |
| 152 | android:exported="false" |
| 153 | /> |
| 154 | |
| 155 | <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 --> |
| 156 | <!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 --> |
| 157 | <service |
| 158 | android:name="cn.jpush.android.service.DaemonService" |
| 159 | android:enabled="true" |
| 160 | android:exported="true"> |
| 161 | <intent-filter> |
| 162 | <action android:name="cn.jpush.android.intent.DaemonService" /> |
| 163 | <category android:name="$PACKAGE_NAME" /> |
| 164 | </intent-filter> |
| 165 | |
| 166 | </service> |
| 167 | |
| 168 | <!-- since 3.1.0 Required SDK 核心功能--> |
| 169 | <provider |
| 170 | android:authorities="$PACKAGE_NAME.DownloadProvider" |
| 171 | android:name="cn.jpush.android.service.DownloadProvider" |
| 172 | android:exported="true" |
| 173 | /> |
| 174 | |
| 175 | <!-- Required SDK核心功能--> |
| 176 | <receiver |
| 177 | android:name="cn.jpush.android.service.PushReceiver" |
| 178 | android:enabled="true" |
| 179 | android:exported="false"> |
| 180 | <intent-filter android:priority="1000"> |
| 181 | <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!--Required 显示通知栏 --> |
| 182 | <category android:name="$PACKAGE_NAME" /> |
| 183 | </intent-filter> |
| 184 | <intent-filter> |
| 185 | <action android:name="android.intent.action.USER_PRESENT" /> |
| 186 | <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> |
| 187 | </intent-filter> |
| 188 | <!-- Optional --> |
| 189 | <intent-filter> |
| 190 | <action android:name="android.intent.action.PACKAGE_ADDED" /> |
| 191 | <action android:name="android.intent.action.PACKAGE_REMOVED" /> |
| 192 | |
| 193 | <data android:scheme="package" /> |
| 194 | </intent-filter> |
| 195 | </receiver> |
| 196 | |
| 197 | <!-- Required SDK核心功能--> |
| 198 | <receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false"/> |
| 199 | |
| 200 | <!--since 3.3.0 接收JPush相关事件--> |
| 201 | <receiver android:name="cn.jiguang.cordova.push.JPushEventReceiver"> |
| 202 | <intent-filter> |
| 203 | <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" /> |
| 204 | <category android:name="$PACKAGE_NAME"></category> |
| 205 | </intent-filter> |
| 206 | </receiver> |
| 207 | |
| 208 | <!--since 3.3.0 Required SDK核心功能--> |
| 209 | <activity |
| 210 | android:name="cn.jpush.android.service.JNotifyActivity" |
| 211 | android:exported="true" |
| 212 | android:taskAffinity="jpush.custom" |
| 213 | android:theme="@android:style/Theme.Translucent.NoTitleBar"> |
| 214 | <intent-filter> |
| 215 | <action android:name="cn.jpush.android.intent.JNotifyActivity" /> |
| 216 | <category android:name="$PACKAGE_NAME" /> |
| 217 | </intent-filter> |
| 218 | </activity> |
| 219 | |
| 220 | <!-- since 3.3.0 Required SDK 核心功能--> |
| 221 | <!-- 可配置android:process参数将PushService放在其他进程中 --> |
| 222 | <!--User defined. For test only 继承自cn.jpush.android.service.JCommonService--> |
| 223 | <service android:name="cn.jiguang.cordova.push.PushService" |
| 224 | android:process=":pushcore"> |
| 225 | <intent-filter> |
| 226 | <action android:name="cn.jiguang.user.service.action" /> |
| 227 | </intent-filter> |
| 228 | </service> |
| 229 | |
| 230 | |
| 231 | <receiver |
| 232 | android:name="cn.jiguang.cordova.push.JPushReceiver" |
| 233 | android:enabled="true" |
| 234 | android:exported="false"> |
| 235 | <intent-filter> |
| 236 | <action android:name="cn.jpush.android.intent.REGISTRATION" /> |
| 237 | <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> |
| 238 | <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> |
| 239 | <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> |
| 240 | <action android:name="cn.jpush.android.intent.CONNECTION" /> |
| 241 | |
| 242 | <category android:name="$PACKAGE_NAME" /> |
| 243 | </intent-filter> |
| 244 | </receiver> |
| 245 | |
| 246 | <!-- Required . Enable it you can get statistics data with channel --> |
| 247 | <meta-data android:name="JPUSH_CHANNEL" android:value="$CHANNEL"/> |
| 248 | <meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" /> <!-- </>值来自开发者平台取得的AppKey--> |
| 249 | |
| 250 | </config-file> |
| 251 | |
| 252 | <lib-file src="src/android/libs/jpush-android-3.3.4.jar" /> |
| 253 | |
| 254 | <source-file src="src/android/PushService.java" target-dir="src/cn/jiguang/cordova/push" /> |
| 255 | <source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" /> |
| 256 | <source-file src="src/android/JPushReceiver.java" target-dir="src/cn/jiguang/cordova/push" /> |
| 257 | <source-file src="src/android/JPushEventReceiver.java" target-dir="src/cn/jiguang/cordova/push" /> |
| 258 | |
| 259 | <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml" |
| 260 | target="res/drawable/jpush_richpush_btn_selector.xml" /> |
| 261 | <resource-file src="src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml" |
| 262 | target="res/drawable/jpush_richpush_progressbar.xml" /> |
| 263 | |
| 264 | <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png" |
| 265 | target="res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png" /> |
| 266 | <resource-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png" |
| 267 | target="res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png" /> |
| 268 | |
| 269 | <resource-file src="src/android/res/layout/jpush_popwin_layout.xml" |
| 270 | target="res/layout/jpush_popwin_layout.xml" /> |
| 271 | <resource-file src="src/android/res/layout/jpush_webview_layout.xml" |
| 272 | target="res/layout/jpush_webview_layout.xml" /> |
| 273 | <resource-file src="src/android/res/layout/push_notification.xml" |
| 274 | target="res/layout/push_notification.xml" /> |
| 275 | |
| 276 | <resource-file src="src/android/res/values/jpush_style.xml" |
| 277 | target="res/values/jpush_style.xml" /> |
| 278 | <resource-file src="src/android/res/values/jpush_string.xml" |
| 279 | target="res/values/jpush_string.xml" /> |
| 280 | |
| 281 | <resource-file src="src/android/res/values-zh/jpush_string.xml" |
| 282 | target="res/values-zh/jpush_string.xml" /> |
| 283 | </platform> |
| 284 | </plugin> |