AndroidManifest.xml 2.56 KB
Newer Older
Amit Davidi's avatar
Amit Davidi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.wix.reactnativenotifications">

    <!--
     Permissions required for enabling GCM.
     -->
    <permission
        android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

    <application>

16 17 18 19 20 21 22
        <!--
         A proxy-activity that either launches the main activity or resumes the currently running app.
         Required in order to keep the initial intent so it could be retrieved by the JS client.
         Note: we declare it in its own private affinity so that a running app stack wouldn't shadow its creation.
         -->
        <activity android:name=".core.ProxyActivity" android:taskAffinity="com.wix.reactnativenotifications.core.ProxyActivity"/>

Amit Davidi's avatar
Amit Davidi committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
        <!--
         Google's ready-to-use GcmReceiver.
         1. Awaits actual GCM messages (e.g. push notifications) and invokes the GCM service with the concrete content.
         2. Awaits instance-ID/token refresh requests from the GCM and invokes the Instance-ID listener service.
         -->
        <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="${applicationId}" />
            </intent-filter>
        </receiver>
        <!-- Dispatched by the GcmReceiver when messages are received. -->
        <service
40
            android:name="com.wix.reactnativenotifications.gcm.GcmMessageHandlerService"
Amit Davidi's avatar
Amit Davidi committed
41 42 43 44 45 46 47
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>
        <!-- Dispatched by the GcmReceiver. Starts the designated refresh-handling service. -->
        <service
48
            android:name=".gcm.GcmInstanceIdListenerService"
Amit Davidi's avatar
Amit Davidi committed
49 50 51 52 53 54
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID" />
            </intent-filter>
        </service>
        <service
55
            android:name=".gcm.GcmInstanceIdRefreshHandlerService"
Amit Davidi's avatar
Amit Davidi committed
56 57 58 59
            android:exported="false" />
    </application>

</manifest>