-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathplugin.xml
executable file
·169 lines (150 loc) · 8.16 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?xml version="1.0" encoding="UTF-8"?>
<!--当前版本 android 4.2.0 iOS 1.2.0 -->
<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
id="com.aisino.plugin.push"
version="1.0.0">
<name>PushManager</name>
<description>Cordova Baidu Push Plugin</description>
<license>Apache</license>
<keywords>cordova,Push</keywords>
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="PushManager" >
<param name="android-package" value="com.aisino.plugin.push.PushDemoActivity"/>
</feature>
</config-file>
<js-module src="www/android/PushManager.js" name="PushManager">
<clobbers target="window.plugin.pushManager" />
</js-module>
<config-file target="AndroidManifest.xml" parent="/manifest">
<!-- Push service 运行需要的权限 -->
<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.BROADCAST_STICKY" />
<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" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity
android:name="com.aisino.plugin.push.PushDemoActivity"
android:launchMode="singleTask"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.aisino.plugin.push.CustomActivity"
android:configChanges="orientation|keyboardHidden"
android:label="Push_notification_test"
android:launchMode="singleTask">
</activity>
<!-- push service rich media display -->
<activity
android:name="com.baidu.android.pushservice.richmedia.MediaViewActivity"
android:configChanges="orientation|keyboardHidden"
android:label="MediaViewActivity"
android:launchMode="singleTask" >
</activity>
<activity
android:name="com.baidu.android.pushservice.richmedia.MediaListActivity"
android:configChanges="orientation|keyboardHidden"
android:label="MediaListActivity"
android:launchMode="singleTask" >
</activity>
<!-- push service client -->
<receiver android:name="com.aisino.plugin.push.PushMessageReceiver">
<intent-filter>
<!-- 接收push消息 -->
<action android:name="com.baidu.android.pushservice.action.MESSAGE" />
<!-- 接收tagsinfo消息 -->
<action android:name="com.baidu.android.pushservice.action.TAGS" />
<action android:name="com.baidu.android.pushservice.action.USERNAME" />
<!-- 接收bind,unbind,fetch,delete等反馈消息 -->
<action android:name="com.baidu.android.pushservice.action.RECEIVE" />
<action android:name="com.baidu.android.pushservice.action.notification.CLICK" />
</intent-filter>
</receiver>
<!-- push service -->
<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" />
</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>
<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>
<!-- push service end -->
<!-- 在百度开发者中心查询应用的API Key -->
<meta-data android:name="api_key" android:value="YOUR_API_KEY" />
</config-file>
<source-file src="src/android/PushDemoActivity.java" target-dir="src/com/aisino/plugin/push" />
<source-file src="src/android/LoginActivity.java" target-dir="src/com/aisino/plugin/push" />
<source-file src="src/android/PushMessageReceiver.java" target-dir="src/com/aisino/plugin/push" />
<source-file src="src/android/Utils.java" target-dir="src/com/aisino/plugin/push" />
<source-file src="src/android/HttpRequest.java" target-dir="src/com/aisino/plugin/push" />
<source-file src="libs/armeabi/libbdpush_V2_2.so" target-dir="libs/armeabi" />
<source-file src="libs/mips/libbdpush_V2_2.so" target-dir="libs/mips" />
<source-file src="libs/pushservice-4.2.0.63.jar" target-dir="libs" />
</platform>
<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="PushManager">
<param name="ios-package" value="PushManager" />
</feature>
</config-file>
<js-module src="www/ios/PushManager.js" name="PushManager">
<clobbers target="window.plugin.pushManager" />
</js-module>
<!-- push lib -->
<header-file src="src/ios/lib/Base64.h" />
<source-file src="src/ios/lib/Base64.m" compiler-flags="-fno-objc-arc" />
<header-file src="src/ios/lib/Base64Defines.h" />
<header-file src="src/ios/lib/GzipCompressor.h" />
<source-file src="src/ios/lib/GzipCompressor.m" compiler-flags="-fno-objc-arc" />
<header-file src="src/ios/lib/JSONKit.h" />
<source-file src="src/ios/lib/JSONKit.m" compiler-flags="-fno-objc-arc" />
<header-file src="src/ios/lib/BPush.h" />
<header-file src="src/ios/lib/OpenUDID.h" />
<source-file src="src/ios/lib/OpenUDID.m" compiler-flags="-fno-objc-arc" />
<header-file src="src/ios/lib/Reachability.h" />
<source-file src="src/ios/lib/Reachability.m" compiler-flags="-fno-objc-arc" />
<header-file src="src/ios/lib/BPushClass.h" />
<source-file src="src/ios/lib/BPushClass.m" />
<!-- push Supporting Files -->
<source-file src="src/ios/Supporting Files/BPushConfig.plist" />
<source-file src="src/ios/lib/libBPush.a" framework="true"/>
<source-file src="src/ios/Supporting Files/cat.caf" />
<header-file src="src/ios/PushManager.h" />
<source-file src="src/ios/PushManager.m" />
<framework src="Foundation.framework" />
<framework src="CoreTelephony.framework" />
<framework src="SystemConfiguration.framework" />
<framework src="libz.dylib" />
<framework src="libc++.dylib" />
<framework src="Security.framework" />
</platform>
</plugin>