<?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.rdiot.yx485">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <uses-permission
        android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />

    <!-- Request legacy Bluetooth permissions on older devices. -->
    <uses-permission
        android:name="android.permission.BLUETOOTH"
        android:maxSdkVersion="30" />
    <uses-permission
        android:name="android.permission.BLUETOOTH_ADMIN"
        android:maxSdkVersion="30" />
    <!-- Android12 的蓝牙权限 如果您的应用查找蓝牙设备（如蓝牙低功耗 (BLE) 外围设备） -->
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
    <!-- Android12 的蓝牙权限 如果您的应用使当前设备可被其他蓝牙设备检测到 -->
    <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
    <!-- Android12 的蓝牙权限 如果您的应用与已配对的蓝牙设备通信或者获取当前手机蓝牙是否打开 -->
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

    <uses-permission android:name="android.permission.CAMERA" />

    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />


    <queries>
        <intent>
            <action android:name="android.intent.action.PICK" />
            <data android:mimeType="image/*" />
        </intent>
    </queries>

    <application
        android:name=".MyApp"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:targetApi="31">
        <activity
            android:name="com.rdiot.yx485.ui.main.MainActivity"
            android:screenOrientation="portrait" />

        <activity
            android:name=".ui.login.LoginActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />

        <activity
            android:name=".ui.bind.BindActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.bind.QRCodeActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.mine.UserInfoActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.login.SetPwdActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.family.FamilyManagementActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.web.WebActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.SplashActivity"
            android:exported="true"
            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=".ui.mine.SettingActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.ctrl.RoomCtrlMainActivity"
            android:screenOrientation="portrait" />


        <!--适配华为（huawei）刘海屏-->
        <meta-data
            android:name="android.notch_support"
            android:value="true" />
        <!--适配小米（xiaomi）刘海屏-->
        <meta-data
            android:name="notch.config"
            android:value="portrait|landscape" />

        <meta-data
            android:name="design_width_in_dp"
            android:value="390" />
        <meta-data
            android:name="design_height_in_dp"
            android:value="844" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/update_cache_path" />
        </provider>
    </application>

</manifest>