-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathplugin.xml
126 lines (115 loc) · 6 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
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="xwang.cordova.umeng.push" version="0.0.1">
<name>UmengPush</name>
<description>A cordova plugin, a JS version of Umeng Push SDK</description>
<licience>MIT</licience>
<keywords>cordova,umeng,push</keywords>
<repo>https://github.com/hkizuna/cordova-plugin-umeng-push.git</repo>
<issue>https://github.com/hkizuna/cordova-plugin-umeng-push/issues</issue>
<preference name="UMENGIOSAPPID" />
<preference name="UMENGANDROIDAPPID" />
<preference name="UMENGMESSAGESECRET" />
<preference name="XIAOMIAPPID" />
<preference name="XIAOMIAPPKEY" />
<!-- required cordova version -->
<engines>
<engine name="cordova" version=">=3.9.2" />
</engines>
<!-- js module -->
<js-module src="www/umeng-push.js" name="UmengPush">
<clobbers target="UmengPush" />
</js-module>
<js-module src="www/alias-type.js" name="AliasType">
<clobbers target="AliasType" />
</js-module>
<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="UmengPush">
<param name="ios-package" value="CDVUmengPush" />
<param name="onload" value="true" />
</feature>
<preference name="UMENGPUSHAPPID" value="$UMENGIOSAPPID" />
</config-file>
<!-- plugin source code -->
<header-file src="src/ios/CDVUmengPush.h" />
<source-file src="src/ios/CDVUmengPush.m" />
<header-file src="src/ios/AppDelegate+UmengPush.h" />
<source-file src="src/ios/AppDelegate+UmengPush.m" />
<!-- umeng push -->
<header-file src="src/ios/libs/UMessage_Sdk_1.4.0/UMessage.h" />
<source-file src="src/ios/libs/UMessage_Sdk_1.4.0/libUMessage_Sdk_1.4.0.a" framework="true" />
<!-- other required frameworks -->
<framework src="libz.dylib" />
<framework src="UserNotifications.framework" />
</platform>
<!-- android -->
<platform name="android">
<hook type="after_plugin_add" src="scripts/androidInstall.js" />
<hook type="after_plugin_install" src="scripts/androidInstall.js" />
<hook type="before_plugin_rm" src="scripts/androidUninstall.js" />
<hook type="before_plugin_uninstall" src="scripts/androidUninstall.js" />
<config-file target="res/xml/config.xml" parent="/*">
<feature name="UmengPush">
<param name="android-package" value="xwang.cordova.umeng.push.UmengPush"/>
<param name="onload" value="true" />
</feature>
<preference name="XIAOMIAPPID" value="$XIAOMIAPPID"/>
<preference name="XIAOMIAPPKEY" value="$XIAOMIAPPKEY"/>
</config-file>
<!-- umeng push -->
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<meta-data android:name="UMENG_APPKEY" android:value="$UMENGANDROIDAPPID">
</meta-data>
<meta-data android:name="UMENG_MESSAGE_SECRET" android:value="$UMENGMESSAGESECRET">
</meta-data>
</config-file>
<source-file src="src/android/UmengPush.java" target-dir="src/xwang/cordova/umeng/push" />
<source-file src="src/android/PushSDK" target-dir="." />
<framework src="src/android/rules.gradle" custom="true" type="gradleReference" />
<!-- xiaomi push -->
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.VIBRATE"/>
<permission android:name="$PACKAGE_NAME.permission.MIPUSH_RECEIVE" android:protectionLevel="signature" />
<uses-permission android:name="$PACKAGE_NAME.permission.MIPUSH_RECEIVE" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:enabled="true" android:process=":pushservice" android:name="com.xiaomi.push.service.XMPushService"/>
<service android:name="com.xiaomi.push.service.XMJobService" android:enabled="true" android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE" android:process=":pushservice" />
<!--注:此service必须在3.0.1版本以后(包括3.0.1版本)加入-->
<service android:enabled="true" android:exported="true" android:name="com.xiaomi.mipush.sdk.PushMessageHandler" />
<service android:enabled="true" android:name="com.xiaomi.mipush.sdk.MessageHandleService" />
<!--注:此service必须在2.2.5版本以后(包括2.2.5版本)加入-->
<receiver android:exported="true" android:name="com.xiaomi.push.service.receivers.NetworkStatusReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver android:exported="false" android:process=":pushservice" android:name="com.xiaomi.push.service.receivers.PingReceiver" >
<intent-filter>
<action android:name="com.xiaomi.push.PING_TIMER" />
</intent-filter>
</receiver>
<receiver android:exported="true" android:name="xwang.cordova.umeng.push.XiaomiPushMessageReceiver">
<intent-filter>
<action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
</intent-filter>
<intent-filter>
<action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" />
</intent-filter>
<intent-filter>
<action android:name="com.xiaomi.mipush.ERROR" />
</intent-filter>
</receiver>
</config-file>
<source-file src="src/android/XiaomiPushMessageReceiver.java" target-dir="src/xwang/cordova/umeng/push" />
<source-file src="src/android/XiaomiUtils.java" target-dir="src/xwang/cordova/umeng/push" />
<source-file src="src/android/libs/MiPush_SDK_Client_3_1_2.jar" target-dir="libs" />
</platform>
</plugin>