<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <!-- Background Push delivery (subscribe(background = true)): scheduled runs that reconnect
         under a short wakelock, on the current network, and resume after a reboot. Apps can also
         declare SCHEDULE_EXACT_ALARM (punctual runs) and REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
         (a direct exemption prompt); both are optional and subject to Google Play policy. -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <!-- Foreground-service background Push delivery (Push.setForeground). Apps that never enable it can
         remove PushService and these two permissions with tools:node="remove". -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />

    <application>
        <activity
            android:name="io.appwrite.flutter.services.PushOpenActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:noHistory="true"
            android:taskAffinity=""
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <service
            android:name="io.appwrite.flutter.services.PushService"
            android:exported="false"
            android:foregroundServiceType="remoteMessaging"
            android:stopWithTask="false" />
        <service
            android:name="io.appwrite.flutter.services.PushJobService"
            android:exported="false"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <receiver
            android:name="io.appwrite.flutter.services.PushAlarmReceiver"
            android:exported="false" />
        <receiver
            android:name="io.appwrite.flutter.services.PushBootReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>
    </application>

</manifest>
