-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.xml
124 lines (111 loc) · 6.94 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-baidu-push" version="1.0.0">
<name>baidu-push</name>
<description>百度推送 Cordova 插件</description>
<license>MIT</license>
<preference name="BAIDU_PUSH_ANDROID_API_KEY"/>
<preference name="BAIDU_PUSH_IOS_API_KEY"/>
<js-module src="www/baidu-push.js" name="baidu-push">
<clobbers target="BaiduPush"/>
</js-module>
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="BaiduPush">
<param name="android-package" value="cn.org.sya.plugins.BaiduPush"/>
</feature>
<preference name="BAIDU_PUSH_ANDROID_API_KEY" value="$BAIDU_PUSH_ANDROID_API_KEY"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<permission android:name="baidu.push.permission.WRITE_PUSHINFOPROVIDER.$PACKAGE_NAME" android:protectionLevel="signature"/>
<uses-permission android:name="baidu.push.permission.WRITE_PUSHINFOPROVIDER.$PACKAGE_NAME"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:name="com.baidu.android.pushservice.PushService" android:exported="true" android:process=":bdservice_v1" >
<intent-filter>
<action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE"/>
</intent-filter>
</service>
<service android:name="com.baidu.android.pushservice.CommandService" android:exported="true"/>
<receiver android:name="com.baidu.android.pushservice.PushServiceReceiver" android:process=":bdservice_v1" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
<action android:name="com.baidu.android.pushservice.action.notification.SHOW"/>
<action android:name="com.baidu.android.pushservice.action.media.CLICK"/>
<action android:name="android.intent.action.MEDIA_MOUNTED"/>
<action android:name="android.intent.action.USER_PRESENT"/>
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
</intent-filter>
</receiver>
<receiver android:name="com.baidu.android.pushservice.RegistrationReceiver" android:process=":bdservice_v1" >
<intent-filter>
<action android:name="com.baidu.android.pushservice.action.METHOD"/>
<action android:name="com.baidu.android.pushservice.action.BIND_SYNC"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
<data android:scheme="package"/>
</intent-filter>
</receiver>
<receiver android:name="cn.org.sya.plugins.BaiduPushReceiver">
<intent-filter>
<action android:name="com.baidu.android.pushservice.action.MESSAGE"/>
<action android:name="com.baidu.android.pushservice.action.RECEIVE"/>
<action android:name="com.baidu.android.pushservice.action.notification.CLICK"/>
</intent-filter>
</receiver>
<provider android:name="com.baidu.android.pushservice.PushInfoProvider"
android:authorities="$PACKAGE_NAME.bdpush"
android:writePermission="baidu.push.permission.WRITE_PUSHINFOPROVIDER.$PACKAGE_NAME"
android:protectionLevel="signature"
android:exported="true"/>
</config-file>
<source-file src="src/android/BaiduPush.java" target-dir="src/cn/org/sya/plugins"/>
<source-file src="src/android/BaiduPushReceiver.java" target-dir="src/cn/org/sya/plugins"/>
<resource-file src="libs/android/arm64-v8a/libbdpush_V2_9.so" target="libs/arm64-v8a/libbdpush_V2_9.so"/>
<resource-file src="libs/android/armeabi/libbdpush_V2_9.so" target="libs/armeabi/libbdpush_V2_9.so"/>
<resource-file src="libs/android/armeabi-v7a/libbdpush_V2_9.so" target="libs/armeabi-v7a/libbdpush_V2_9.so"/>
<resource-file src="libs/android/mips/libbdpush_V2_9.so" target="libs/mips/libbdpush_V2_9.so"/>
<resource-file src="libs/android/mips64/libbdpush_V2_9.so" target="libs/mips64/libbdpush_V2_9.so"/>
<resource-file src="libs/android/x86/libbdpush_V2_9.so" target="libs/x86/libbdpush_V2_9.so"/>
<resource-file src="libs/android/x86_64/libbdpush_V2_9.so" target="libs/x86_64/libbdpush_V2_9.so"/>
<lib-file src="libs/android/pushservice-6.0.0.64.jar"/>
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="BaiduPush">
<param name="ios-package" value="BaiduPush"/>
<param name="onload" value="true"/>
</feature>
<preference name="BAIDU_PUSH_IOS_API_KEY" value="$BAIDU_PUSH_IOS_API_KEY"/>
</config-file>
<config-file parent="aps-environment" target="*/Entitlements-*.plist">
<string>production</string>
</config-file>
<header-file src="src/ios/BaiduPush.h"/>
<source-file src="src/ios/BaiduPush.m"/>
<header-file src="src/ios/AppDelegate+BaiduPush.h"/>
<source-file src="src/ios/AppDelegate+BaiduPush.m"/>
<header-file src="src/ios/BPush.h"/>
<source-file src="src/ios/libBPush.a" framework="true"/>
<resource-file src="libs/ios/BPushCerResource.bundle"/>
<framework src="Foundation.framework"/>
<framework src="CoreTelephony.framework"/>
<framework src="libz.dylib"/>
<framework src="SystemConfiguration.framework"/>
<framework src="CoreLocation.framework"/>
</platform>
</plugin>