forked from phonegap-build/PushPlugin
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.xml
More file actions
Latest commit
executable file
·164 lines (134 loc) · 6.87 KB
/
Copy pathplugin.xml
File metadata and controls
executable file
·164 lines (134 loc) · 6.87 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<pluginxmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads"
xmlns:rim="http://www.blackberry.com/ns/widgets"
id="com.phonegap.plugins.PushPlugin"
version="2.4.0">
<name>PushPlugin</name>
<author>Bob Easterday</author>
<description>
This plugin allows your application to receive push notifications on Android, iOS, WP8 and Windows8 devices.
Android uses Google Cloud Messaging.
iOS uses Apple APNS Notifications.
WP8 uses Microsoft MPNS Notifications.
Windows8 uses Microsoft WNS Notifications.
</description>
<license>MIT</license>
<js-modulesrc="www/PushNotification.js"name="PushNotification">
<clobberstarget="PushNotification" />
</js-module>
<engines>
<enginename="cordova"version=">=3.0.0" />
</engines>
<!-- android -->
<platformname="android">
<config-filetarget="res/xml/config.xml"parent="/*">
<featurename="PushPlugin" >
<paramname="android-package"value="com.plugin.gcm.PushPlugin"/>
</feature>
</config-file>
<config-filetarget="AndroidManifest.xml"parent="/manifest">
<uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permissionandroid:name="android.permission.GET_ACCOUNTS" />
<uses-permissionandroid:name="android.permission.WAKE_LOCK" />
<uses-permissionandroid:name="android.permission.VIBRATE"/>
<uses-permissionandroid:name="com.google.android.c2dm.permission.RECEIVE" />
<permissionandroid:name="$PACKAGE_NAME.permission.C2D_MESSAGE"android:protectionLevel="signature" />
<uses-permissionandroid:name="$PACKAGE_NAME.permission.C2D_MESSAGE" />
</config-file>
<config-filetarget="AndroidManifest.xml"parent="/manifest/application">
<activityandroid:name="com.plugin.gcm.PushHandlerActivity"android:exported="true"/>
<receiverandroid:name="com.plugin.gcm.CordovaGCMBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<actionandroid:name="com.google.android.c2dm.intent.RECEIVE" />
<actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" />
<categoryandroid:name="$PACKAGE_NAME" />
</intent-filter>
</receiver>
<serviceandroid:name="com.plugin.gcm.GCMIntentService" />
</config-file>
<!-- We link Plugin code and all its dependencies as Android project so we could have
separate build definitions for Ant and Gradle -->
<frameworksrc="src/android"custom="true" />
</platform>
<!-- amazon-fireos -->
<platformname="amazon-fireos">
<config-filetarget="res/xml/config.xml"parent="/*">
<featurename="PushPlugin" >
<paramname="android-package"value="com.amazon.cordova.plugin.PushPlugin"/>
</feature>
<preferencename="showmessageinnotification"value="true" />
<preferencename="defaultnotificationmessage"value="You have a new message." />
</config-file>
<config-filetarget="AndroidManifest.xml"parent="/manifest">
<!-- This permission ensures that no other application can intercept your ADM messages. "[YOUR PACKAGE NAME]" is your package name as defined in your <manifest> tag. -->
<permissionandroid:name="$PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE"android:protectionLevel="signature" />
<uses-permissionandroid:name="$PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE" />
<!-- This permission allows your app access to receive push notifications from ADM. -->
<uses-permissionandroid:name="com.amazon.device.messaging.permission.RECEIVE" />
<!-- ADM uses WAKE_LOCK to keep the processor from sleeping when a message is received. -->
<uses-permissionandroid:name="android.permission.WAKE_LOCK" />
</config-file>
<config-filetarget="AndroidManifest.xml"parent="/manifest/application">
<!-- You must explicitly enable ADM and declare whether your app cannot work without ADM (android:required="true") or can work without ADM (android:required="false").
If you specify android:required="false", your app must degrade gracefully if ADM
is unavailable. -->
<amazon:enable-featureandroid:name="com.amazon.device.messaging"android:required="true"/>
<serviceandroid:exported="false"android:name="com.amazon.cordova.plugin.ADMMessageHandler" />
<activityandroid:exported="true"android:name="com.amazon.cordova.plugin.ADMHandlerActivity" />
<receiverandroid:name="com.amazon.cordova.plugin.ADMMessageHandler$Receiver"android:permission="com.amazon.device.messaging.permission.SEND">
<intent-filter>
<actionandroid:name="com.amazon.device.messaging.intent.REGISTRATION" />
<actionandroid:name="com.amazon.device.messaging.intent.RECEIVE" />
<categoryandroid:name="$PACKAGE_NAME" />
</intent-filter>
</receiver>
</config-file>
<source-filesrc="src/amazon/PushPlugin.java"target-dir="src/com/amazon/cordova/plugin" />
<source-filesrc="src/amazon/ADMMessageHandler.java"target-dir="src/com/amazon/cordova/plugin" />
<source-filesrc="src/amazon/ADMHandlerActivity.java"target-dir="src/com/amazon/cordova/plugin" />
</platform>
<!-- ios -->
<platformname="ios">
<config-filetarget="config.xml"parent="/*">
<featurename="PushPlugin">
<paramname="ios-package"value="PushPlugin"/>
</feature>
</config-file>
<source-filesrc="src/ios/AppDelegate+notification.m" />
<source-filesrc="src/ios/PushPlugin.m" />
<header-filesrc="src/ios/AppDelegate+notification.h" />
<header-filesrc="src/ios/PushPlugin.h" />
</platform>
<!-- blackberry10 -->
<platformname="blackberry10">
<dependencyid="com.blackberry.push" />
<dependencyid="com.blackberry.invoked" />
<config-filetarget="www/config.xml"parent="/widget">
<featurename="PushPlugin"value="PushPlugin" />
</config-file>
<js-modulesrc="www/blackberry10/PushPluginProxy.js"name="PushPluginProxy" >
<runs />
</js-module>
</platform>
<!-- wp8 -->
<platformname="wp8">
<config-filetarget="config.xml"parent="/*">
<featurename="PushPlugin">
<paramname="wp-package"value="PushPlugin"/>
</feature>
</config-file>
<config-filetarget="Properties/WMAppManifest.xml"parent="/Deployment/App/Capabilities">
<CapabilityName="ID_CAP_PUSH_NOTIFICATION"/>
</config-file>
<source-filesrc="src/wp8/PushPlugin.cs" />
<frameworksrc="src/wp8/Newtonsoft.Json.dll"custom="true" />
</platform>
<!-- windows8 -->
<platformname="windows8">
<js-modulesrc="src/windows8/PushPluginProxy.js"name="PushPlugin">
<mergestarget="" />
</js-module>
</platform>
</plugin>