<?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.casic.detector">

    <uses-sdk tools:overrideLibrary="com.pengxh.kt.lite" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /><!--拍照需要-->
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /><!--安装apk权限-->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <uses-permission android:name="android.permission.READ_PHONE_STATE" /><!--用于读取手机当前的状态-->
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /><!--用于申请调用A-GPS模块-->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /><!--用于进行网络定位-->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /><!--用于访问GPS定位-->
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /><!--后台定位权限-->
    <uses-permission android:name="android.permission.CAMERA" /><!--相机权限-->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><!--允许程序设置内置sd卡的d读权限-->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:name=".base.BaseApplication"
        android:allowBackup="true"
        android:allowNativeHeapPointerTagging="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:requestLegacyExternalStorage="true"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Detector"
        android:usesCleartextTraffic="true">
        <activity
            android:name=".view.PermissionActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity android:name=".view.LoginActivity" />
        <activity android:name=".view.MainActivity" />
        <activity
            android:name=".view.ObjectDetailActivity"
            android:theme="@style/Theme.ActivityDialogStyle" />

        <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/file_paths" />
        </provider>

        <!--高德定位-->
        <service android:name="com.amap.api.location.APSService" />

        <!--高德Key-->
        <meta-data
            android:name="com.amap.api.v2.apikey"
            android:value="2d889b1ae39faa2fadb3a6f0eeb98ab9" />

        <!--高德导航-->
        <activity
            android:name="com.amap.api.navi.AmapRouteActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|navigation"
            android:theme="@android:style/Theme.NoTitleBar" />
    </application>

    <queries>
        <!--Android 11+ use camera-->
        <intent>
            <action android:name="android.media.action.IMAGE_CAPTURE" />
        </intent>
        <intent>
            <action android:name="android.media.action.ACTION_VIDEO_CAPTURE" />
        </intent>
    </queries>
</manifest>