<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="in.example.android.iv"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="21"
        android:targetSdkVersion="26" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.SET_ALARM" />
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
    <uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- Required by older versions of Google Play services to create IID tokens -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <permission
        android:name="in.example.android.iv.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="in.example.android.iv.permission.C2D_MESSAGE" />

    <application
        android:name="in.example.android.iv.IVApplication"
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:testOnly="true"
        android:theme="@style/DarkTheme" >
        <receiver
            android:name="in.example.android.iv.utils.AlarmManager"
            android:enabled="true"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.media.action.DISPLAY_NOTIFICATION" />
                <action android:name="ALARM" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>

        <activity
            android:name="in.example.android.iv.activities.LoginActivity"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="in.example.android.iv.activities.HomeActivity"
            android:screenOrientation="portrait"
            android:theme="@style/DarkTheme" />
        <activity
            android:name="in.example.android.iv.activities.ContactsActivity"
            android:screenOrientation="portrait"
            android:theme="@style/DarkTheme" />
        <activity android:name="in.example.android.iv.activities.RequestPermissionActitivty" />
        <activity android:name="in.example.android.iv.activities.FeedbackActivity" />
        <activity android:name="in.example.android.iv.activities.UserInfoActivity" />
        <activity android:name="in.example.android.iv.activities.GetEmergencyInfoActivity" />

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>
        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.INSTALL_PACKAGES" >
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false" />
        <service
            android:name="com.google.android.gms.measurement.AppMeasurementJobService"
            android:enabled="true"
            android:exported="false"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <!--
 FirebaseMessagingService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.messaging.FirebaseMessagingService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <!--
Service handling Google Sign-In user revocation. For apps that do not integrate with
            Google Sign-In, this service will never be started.
        -->
        <service
            android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
            android:exported="true"
            android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />

        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="in.example.android.iv" />
            </intent-filter>
        </receiver>
        <!--
 FirebaseInstanceIdService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.iid.FirebaseInstanceIdService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <provider
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:authorities="in.example.android.iv.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <meta-data
            android:name="android.support.VERSION"
            android:value="26.1.0" />
        <meta-data
            android:name="android.arch.lifecycle.VERSION"
            android:value="27.0.0-SNAPSHOT" />

        <provider
            android:name="com.android.tools.ir.server.InstantRunContentProvider"
            android:authorities="in.example.android.iv.com.android.tools.ir.server.InstantRunContentProvider"
            android:multiprocess="true" />
    </application>

</manifest>