-
Notifications
You must be signed in to change notification settings - Fork 38
/
plugin.xml
199 lines (167 loc) · 8.58 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-xgpush"
version="0.2.0">
<name>xgpush-cordova</name>
<description>Tencent XGPush Plugin</description>
<license>MIT</license>
<author>Gen Liu</author>
<keywords>cordova, push, chinese</keywords>
<repo>https://github.com/gengen1988/xgpush-cordova.git</repo>
<issue>https://github.com/gengen1988/xgpush-cordova/issues</issue>
<engines>
<engine name="cordova" version=">3.0.0" />
</engines>
<preference name="ACCESS_ID" />
<preference name="ACCESS_KEY" />
<js-module name="XGPush" src="www/xgpush.js">
<clobbers target="window.xgpush" />
</js-module>
<!-- android -->
<platform name="android" >
<config-file target="res/xml/config.xml" parent="/*">
<feature name="XGPush">
<param name="android-package" value="com.eteng.push.xgpush2.XGCordova" />
<param name="onload" value="true" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<!-- 【必须】 信鸽SDK所需权限 -->
<!--
<uses-permission android:name="android.permission.INTERNET" />
-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- 【常用】 信鸽SDK所需权限 -->
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 【可选】 信鸽SDK所需权限 -->
<!--
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
-->
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<!-- 【必须】 信鸽receiver广播接收 -->
<receiver android:name="com.tencent.android.tpush.XGPushReceiver"
android:process=":xg_service_v2" >
<intent-filter android:priority="0x7fffffff" >
<!-- 【必须】 信鸽SDK的内部广播 -->
<action android:name="com.tencent.android.tpush.action.SDK" />
<action android:name="com.tencent.android.tpush.action.INTERNAL_PUSH_MESSAGE" />
<!-- 【必须】 系统广播:网络切换 -->
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<!-- 【可选】 系统广播:开屏 -->
<action android:name="android.intent.action.USER_PRESENT" />
<!-- 【可选】 一些常用的系统广播,增强信鸽service的复活机会,请根据需要选择。当然,你也可以添加APP自定义的一些广播让启动service -->
<!--
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
-->
</intent-filter>
<!-- 【可选】 usb相关的系统广播,增强信鸽service的复活机会,请根据需要添加 -->
<!--
<intent-filter android:priority="0x7fffffff" >
<action android:name="android.intent.action.MEDIA_UNMOUNTED" />
<action android:name="android.intent.action.MEDIA_REMOVED" />
<action android:name="android.intent.action.MEDIA_CHECKING" />
<action android:name="android.intent.action.MEDIA_EJECT" />
<data android:scheme="file" />
</intent-filter>
-->
</receiver>
<!-- 【必须】 (2.30及以上版新增)展示通知的activity -->
<!-- 【注意】 如果被打开的activity是启动模式为SingleTop,SingleTask或SingleInstance,请根据通知的异常自查列表第8点处理-->
<activity android:name="com.tencent.android.tpush.XGPushActivity"
android:theme="@android:style/Theme.Translucent"
android:exported="false" >
<intent-filter>
<!-- 若使用AndroidStudio,请设置android:name="android.intent.action"-->
<action android:name="android.intent.action" />
</intent-filter>
</activity>
<!-- 【必须】 信鸽service -->
<service android:name="com.tencent.android.tpush.service.XGPushService"
android:exported="true"
android:persistent="true"
android:process=":xg_service_v2">
</service>
<!-- 【必须】 通知service,此选项有助于提高抵达率 -->
<service android:name="com.tencent.android.tpush.rpc.XGRemoteService"
android:exported="true" >
<intent-filter>
<action android:name="$PACKAGE_NAME.PUSH_ACTION" />
</intent-filter>
</service>
<!-- 【必须】 请将YOUR_ACCESS_ID修改为APP的AccessId,“21”开头的10位数字,中间没空格 -->
<meta-data android:name="XG_V2_ACCESS_ID"
android:value="$ACCESS_ID">
</meta-data>
<!-- 【必须】 请将YOUR_ACCESS_KEY修改为APP的AccessKey,“A”开头的12位字符串,中间没空格 -->
<meta-data android:name="XG_V2_ACCESS_KEY"
android:value="$ACCESS_KEY">
</meta-data>
</config-file>
<source-file src="src/android/v2/XGPushPlugin.java" target-dir="src/com/eteng/push/xgpush2" />
<source-file src="src/android/v2/XGCordovaPushReceiver.java" target-dir="src/com/eteng/push/xgpush2" />
<source-file src="src/android/v2/XGCordovaOperateCallback.java" target-dir="src/com/eteng/push/xgpush2" />
<source-file src="src/android/v2/XGCordova.java" target-dir="src/com/eteng/push/xgpush2" />
<source-file src="src/android/v2/ReceiverManager.java" target-dir="src/com/eteng/push/xgpush2" />
<!-- Tencent XGPush SDK -->
<source-file src="sdk/android/libs/android-support-v4.jar" target-dir="libs" />
<source-file src="sdk/android/libs/jg_filter_sdk_1.1.jar" target-dir="libs" />
<source-file src="sdk/android/libs/Xg_sdk_v2.47_20161026_0936.jar" target-dir="libs" />
<source-file src="sdk/android/libs/wup-1.0.0.E-SNAPSHOT.jar" target-dir="libs" />
<!-- device related static library, you may need other platform so -->
<source-file src="sdk/android/libs/armeabi/libtpnsSecurity.so" target-dir="libs/armeabi" />
<source-file src="sdk/android/Other-Platform-SO/armeabi-v7a/libtpnsSecurity.so" target-dir="libs/armeabi-v7a" />
</platform>
<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="XGPush">
<param name="ios-package" value="CDVXGPushPlugin"/>
<param name="onload" value="true"/>
</feature>
</config-file>
<config-file target="*-Info.plist" parent="XGPushMeta">
<dict>
<key>AccessID</key>
<integer>$ACCESS_ID</integer>
<key>AccessKey</key>
<string>$ACCESS_KEY</string>
</dict>
</config-file>
<!-- Tencent XGPush SDK -->
<header-file src="sdk/ios/demo/sdk/XGPush.h" />
<header-file src="sdk/ios/demo/sdk/XGSetting.h" />
<source-file src="sdk/ios/demo/sdk/libXG-SDK.a" framework="true" />
<!-- Cordova Plugin -->
<header-file src="src/ios/AppDelegate+CDVXGPush.h" />
<source-file src="src/ios/AppDelegate+CDVXGPush.m" />
<header-file src="src/ios/CDVXGPushPlugin.h" />
<source-file src="src/ios/CDVXGPushPlugin.m" />
<header-file src="src/ios/CDVXGPushUtil.h" />
<source-file src="src/ios/CDVXGPushUtil.m" />
<header-file src="src/ios/CDVRegisterNotification.h" />
<source-file src="src/ios/CDVRegisterNotification.m" />
<!-- Dependencies -->
<framework src="libz.dylib" />
<framework src="libsqlite3.dylib" />
<framework src="CFNetwork.framework" />
<framework src="SystemConfiguration.framework" />
<framework src="CoreTelephony.framework" />
<framework src="Security.framework" />
</platform>
</plugin>