<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.ejada.hmg">
    <!--
         io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here.
    -->
    <uses-permission
        android:name="android.permission.ACTIVITY_RECOGNITION"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.READ_PHONE_STATE"
        tools:node="remove" /> <!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/> -->
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> -->
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> -->
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> -->
    <uses-permission
        android:name="android.permission.BROADCAST_STICKY"
        tools:node="remove" />
    <uses-permission
        android:name="com.google.android.gms.permission.AD_ID"
        tools:node="remove" /> <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"
        tools:node="remove" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />

    <!-- Added by open_filex -->
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" tools:node="remove" />

    <uses-permission
        android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
        tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
    <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />

    <uses-feature
        android:name="android.hardware.sensor.stepcounter"
        android:required="false"
        tools:node="replace" />
    <uses-feature
        android:name="android.hardware.sensor.stepdetector"
        android:required="false"
        tools:node="replace" />

    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

    <uses-feature
        android:name="android.hardware.location.network"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false" />

    <uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA" /> <!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" /> -->
    <!-- Wifi Permissions -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> -->
    <!-- Detect Reboot Permission -->
    <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> -->
    <queries>
        <intent>
            <action android:name="android.speech.RecognitionService" />
        </intent>

        <package android:name="com.whatsapp" />
        <package android:name="com.whatsapp.w4b" />
    </queries>

    <application
        android:name=".Application"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher_local"
        android:label="Dr. Alhabib"
        android:screenOrientation="sensorPortrait"
        android:showOnLockScreen="true"
        android:usesCleartextTraffic="true"
        tools:replace="android:label">
        <activity
            android:name="com.cloud.hmg_patient_app.whatsapp.WhatsAppCodeActivity"
            android:exported="true"
            android:enabled="true"
            android:launchMode="standard"
            >
            <intent-filter>
                <action android:name="com.whatsapp.otp.OTP_RETRIEVED" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="push_kit_auto_init_enabled"
            android:value="true" />

        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:enabled="true"
            android:exported="true"
            android:hardwareAccelerated="true"
            android:launchMode="singleTop"
            android:showOnLockScreen="true"
            android:theme="@style/LaunchTheme"
            android:windowSoftInputMode="adjustResize"
            tools:node="merge">

            <!--
                 Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI.
            -->
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme" />
            <!--
                 Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame.
            -->
            <meta-data
                android:name="io.flutter.embedding.android.SplashScreenDrawable"
                android:resource="@drawable/launch_background" />


            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity> <!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" 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> -->
        <!-- Geofencing -->
        <service
            android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <receiver
            android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver"
            android:enabled="true"
            android:exported="false" />
        <receiver
            android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".geofence.intent_receivers.LocationProviderChangeReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.location.PROVIDERS_CHANGED" />
            </intent-filter>
        </receiver>

        <service
            android:name=".geofence.intent_receivers.ReregisterGeofenceJobService"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" /> <!-- Geofencing -->
        <!--
        Huawei Push Notifications
        Set push kit auto enable to true (for obtaining the token on initialize)
        -->
        <!-- <meta-data -->
        <!-- android:name="push_kit_auto_init_enabled" -->
        <!-- android:value="true" /> -->
        <!-- These receivers are for sending scheduled local notifications -->
        <receiver
            android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationScheduledPublisher"
            android:enabled="true"
            android:exported="false" />
        <receiver
            android:name="com.huawei.hms.flutter.push.receiver.BackgroundMessageBroadcastReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" />
            </intent-filter>
        </receiver> <!-- Huawei Push Notifications -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8" />
        <!--
 Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
        -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>

</manifest>