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

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.USB_PERMISSION" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <!-- OTA 以 DownloadManager VISIBILITY_HIDDEN 靜默下載，需此權限否則 enqueue 會丟 Invalid value for visibility: 2 -->
    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

    <application
        android:name=".MyApp"
        android:allowBackup="false"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@drawable/starcloud_logo_circle"
        android:label="@string/app_name"
        android:roundIcon="@drawable/starcloud_logo_circle"
        android:supportsRtl="true"
        android:theme="@style/Theme.SmartDevice"
        android:windowSoftInputMode="adjustPan"
        android:networkSecurityConfig="@xml/network_security_config"
        android:usesCleartextTraffic="true"
        tools:targetApi="31">
        <receiver
            android:name=".worker.BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.intent.action.PACKAGE_REPLACED"/>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
                <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
            </intent-filter>
        </receiver>
        <activity
            android:name=".ui.SettingActivity"
            android:exported="false" />
        <activity
            android:name=".ui.XyshjTestActivity"
            android:exported="false" />
        <activity
            android:name=".ui.DebugActivity"
            android:exported="false" />
        <activity
            android:name=".ui.SettingTestActivity"
            android:exported="false" />
        <activity
            android:name=".ui.SystemSetActivity"
            android:exported="false" />
        <activity
            android:name=".ui.ProductSearchActivity"
            android:exported="false" />
        <activity
            android:name=".ui.devs.vmc.VmcSlotListActivity"
            android:exported="false" />
        <activity
            android:name=".ui.devs.electric.ElectricSlotListActivity"
            android:exported="false" />
        <activity
            android:name=".ui.ProductListActivity"
            android:exported="false" />
        <activity
            android:name=".ui.FontendActivity"
            android:exported="false" />
        <activity
            android:name=".ui.tools.CashMachineSettings"
            android:exported="false" />
        <activity
            android:name=".ui.RestartHostActivity"
            android:exported="false" />
        <activity
            android:name=".ui.RestartActivity"
            android:theme="@style/Theme.ImageBackground"
            android:exported="false" />
        <activity
            android:name=".ui.MaintenanceActivity"
            android:theme="@style/Theme.SmartDevice"
            android:exported="false" />
        <activity
            android:name=".ui.MaintenanceSerialActivity"
            android:theme="@style/Theme.SmartDevice"
            android:exported="false" />
        <activity
            android:name=".HomeActivity"
            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=".MainActivity"
            android:exported="false">
        </activity>
        <service
            android:name=".service.MqttService"
            android:enabled="true"
            android:exported="false"
            android:foregroundServiceType="dataSync" />
    </application>
    <queries>
        <package android:name="com.xyshj.machine" />
    </queries>

</manifest>