添加极光推送插件
diff --git a/platforms/android/android.json b/platforms/android/android.json
index 825de01..6103bb9 100644
--- a/platforms/android/android.json
+++ b/platforms/android/android.json
@@ -51,6 +51,10 @@
{
"xml": "<feature name=\"ThemeableBrowser\"><param name=\"android-package\" value=\"com.initialxy.cordova.themeablebrowser.ThemeableBrowser\" /></feature>",
"count": 1
+ },
+ {
+ "xml": "<feature name=\"JPushPlugin\"><param name=\"android-package\" value=\"cn.jiguang.cordova.push.JPushPlugin\" /></feature>",
+ "count": 1
}
]
}
@@ -82,6 +86,78 @@
"/manifest": [
{
"xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
+ "count": 2
+ },
+ {
+ "xml": "<permission android:name=\"com.supwisdom.dlapp.permission.JPUSH_MESSAGE\" android:protectionLevel=\"signature\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"com.supwisdom.dlapp.permission.JPUSH_MESSAGE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.VIBRATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.GET_TASKS\" />",
"count": 1
}
],
@@ -90,6 +166,64 @@
"xml": "<provider android:authorities=\"${applicationId}.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"org.apache.cordova.camera.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/camera_provider_paths\" /></provider>",
"count": 1
}
+ ],
+ "/manifest/application": [
+ {
+ "xml": "<activity android:exported=\"false\" android:name=\"cn.jpush.android.ui.PopWinActivity\" android:theme=\"@style/MyDialogStyle\"></activity>",
+ "count": 1
+ },
+ {
+ "xml": "<activity android:configChanges=\"orientation|keyboardHidden\" android:exported=\"false\" android:name=\"cn.jpush.android.ui.PushActivity\" android:theme=\"@android:style/Theme.NoTitleBar\"><intent-filter><action android:name=\"cn.jpush.android.ui.PushActivity\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter></activity>",
+ "count": 1
+ },
+ {
+ "xml": "<service android:exported=\"false\" android:name=\"cn.jpush.android.service.PushService\" android:process=\":pushcore\"><intent-filter><action android:name=\"cn.jpush.android.intent.REGISTER\" /><action android:name=\"cn.jpush.android.intent.REPORT\" /><action android:name=\"cn.jpush.android.intent.PushService\" /><action android:name=\"cn.jpush.android.intent.PUSH_TIME\" /></intent-filter></service>",
+ "count": 1
+ },
+ {
+ "xml": "<provider android:authorities=\"com.supwisdom.dlapp.DataProvider\" android:exported=\"false\" android:name=\"cn.jpush.android.service.DataProvider\" android:process=\":pushcore\" />",
+ "count": 1
+ },
+ {
+ "xml": "<service android:enabled=\"true\" android:exported=\"true\" android:name=\"cn.jpush.android.service.DaemonService\"><intent-filter><action android:name=\"cn.jpush.android.intent.DaemonService\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter></service>",
+ "count": 1
+ },
+ {
+ "xml": "<provider android:authorities=\"com.supwisdom.dlapp.DownloadProvider\" android:exported=\"true\" android:name=\"cn.jpush.android.service.DownloadProvider\" />",
+ "count": 1
+ },
+ {
+ "xml": "<receiver android:enabled=\"true\" android:exported=\"false\" android:name=\"cn.jpush.android.service.PushReceiver\"><intent-filter android:priority=\"1000\"><action android:name=\"cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter><intent-filter><action android:name=\"android.intent.action.USER_PRESENT\" /><action android:name=\"android.net.conn.CONNECTIVITY_CHANGE\" /></intent-filter><intent-filter><action android:name=\"android.intent.action.PACKAGE_ADDED\" /><action android:name=\"android.intent.action.PACKAGE_REMOVED\" /><data android:scheme=\"package\" /></intent-filter></receiver>",
+ "count": 1
+ },
+ {
+ "xml": "<receiver android:exported=\"false\" android:name=\"cn.jpush.android.service.AlarmReceiver\" />",
+ "count": 1
+ },
+ {
+ "xml": "<receiver android:name=\"cn.jiguang.cordova.push.JPushEventReceiver\"><intent-filter><action android:name=\"cn.jpush.android.intent.RECEIVE_MESSAGE\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter></receiver>",
+ "count": 1
+ },
+ {
+ "xml": "<activity android:exported=\"true\" android:name=\"cn.jpush.android.service.JNotifyActivity\" android:taskAffinity=\"jpush.custom\" android:theme=\"@android:style/Theme.Translucent.NoTitleBar\"><intent-filter><action android:name=\"cn.jpush.android.intent.JNotifyActivity\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter></activity>",
+ "count": 1
+ },
+ {
+ "xml": "<service android:name=\"cn.jiguang.cordova.push.PushService\" android:process=\":pushcore\"><intent-filter><action android:name=\"cn.jiguang.user.service.action\" /></intent-filter></service>",
+ "count": 1
+ },
+ {
+ "xml": "<receiver android:enabled=\"true\" android:exported=\"false\" android:name=\"cn.jiguang.cordova.push.JPushReceiver\"><intent-filter><action android:name=\"cn.jpush.android.intent.REGISTRATION\" /><action android:name=\"cn.jpush.android.intent.MESSAGE_RECEIVED\" /><action android:name=\"cn.jpush.android.intent.NOTIFICATION_RECEIVED\" /><action android:name=\"cn.jpush.android.intent.NOTIFICATION_OPENED\" /><action android:name=\"cn.jpush.android.intent.CONNECTION\" /><category android:name=\"com.supwisdom.dlapp\" /></intent-filter></receiver>",
+ "count": 1
+ },
+ {
+ "xml": "<meta-data android:name=\"JPUSH_CHANNEL\" android:value=\"developer-default\" />",
+ "count": 1
+ },
+ {
+ "xml": "<meta-data android:name=\"JPUSH_APPKEY\" android:value=\"your_jpush_appkey\" />",
+ "count": 1
+ }
]
}
},
@@ -147,6 +281,14 @@
},
"cordova-plugin-themeablebrowser": {
"PACKAGE_NAME": "com.supwisdom.dlapp"
+ },
+ "cordova-plugin-jcore": {
+ "PACKAGE_NAME": "com.supwisdom.dlapp"
+ },
+ "jpush-phonegap-plugin": {
+ "APP_KEY": "your_jpush_appkey",
+ "CHANNEL": "developer-default",
+ "PACKAGE_NAME": "com.supwisdom.dlapp"
}
},
"dependent_plugins": {},
@@ -470,6 +612,14 @@
"clobbers": [
"cordova.ThemeableBrowser"
]
+ },
+ {
+ "id": "jpush-phonegap-plugin.JPushPlugin",
+ "file": "plugins/jpush-phonegap-plugin/www/JPushPlugin.js",
+ "pluginId": "jpush-phonegap-plugin",
+ "clobbers": [
+ "JPush"
+ ]
}
],
"plugin_metadata": {
@@ -485,6 +635,8 @@
"cordova-plugin-camera": "4.0.3",
"cordova-plugin-inappbrowser": "3.0.0",
"cordova-plugin-device": "2.0.2",
- "cordova-plugin-themeablebrowser": "0.2.17"
+ "cordova-plugin-themeablebrowser": "0.2.17",
+ "cordova-plugin-jcore": "1.3.0",
+ "jpush-phonegap-plugin": "3.7.2"
}
}