Skip to content

Commit cf3d57b

Browse files
committed
Updating dev app AndroidManifest to support Amazon
1 parent 765f77e commit cf3d57b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Examples/OneSignalDemo/app/src/main/AndroidManifest.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4+
xmlns:amazon="http://schemas.amazon.com/apk/res/android"
45
package="com.onesignal.sdktest">
56

67
<uses-permission android:name="com.android.vending.BILLING" />
78

89
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
910
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
1011

12+
<permission
13+
android:name="com.onesignal.sdktest.permission.RECEIVE_ADM_MESSAGE"
14+
android:protectionLevel="signature" />
15+
<uses-permission android:name="com.onesignal.sdktest.permission.RECEIVE_ADM_MESSAGE" />
16+
<!-- This permission allows your app access to receive push notifications from ADM. -->
17+
<uses-permission android:name="com.amazon.device.messaging.permission.RECEIVE" />
18+
19+
<!-- ADM uses WAKE_LOCK to keep the processor from sleeping when a message is received. -->
20+
<uses-permission android:name="android.permission.WAKE_LOCK" />
21+
1122
<application
1223
android:name=".application.MainApplication"
1324
android:allowBackup="true"
@@ -18,6 +29,37 @@
1829
android:theme="@style/AppTheme"
1930
tools:ignore="GoogleAppIndexingWarning">
2031

32+
<amazon:enable-feature
33+
android:name="com.amazon.device.messaging"
34+
android:required="false"/>
35+
36+
<!-- You must replace the names in the service and receiver tags
37+
with names that are appropriate to your package. -->
38+
39+
<service
40+
android:name="com.onesignal.ADMMessageHandlerJob"
41+
android:permission="android.permission.BIND_JOB_SERVICE"
42+
android:exported="false" />
43+
44+
<!-- This is needed for devices with older ADM versions -->
45+
<service
46+
android:name="com.onesignal.ADMMessageHandler"
47+
android:exported="false" />
48+
49+
<receiver
50+
android:name="com.onesignal.ADMMessageHandler$Receiver"
51+
android:permission="com.amazon.device.messaging.permission.SEND" >
52+
53+
<!-- To interact with ADM, your app must listen for the following intents. -->
54+
<intent-filter>
55+
<action android:name="com.amazon.device.messaging.intent.REGISTRATION" />
56+
<action android:name="com.amazon.device.messaging.intent.RECEIVE" />
57+
58+
<!-- Replace the name in the category tag with your app's package name. -->
59+
<category android:name="com.onesignal.sdktest" />
60+
</intent-filter>
61+
</receiver>
62+
2163
<meta-data android:name="com.onesignal.NotificationServiceExtension"
2264
android:value="com.onesignal.sdktest.notification.NotificationServiceExtension" />
2365

0 commit comments

Comments
 (0)