<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.cl.meshtastic"
    android:installLocation="auto"
    android:versionCode="1"
    android:versionName="1.0">
    <uses-permission android:name="android.permission.INTERNET"/>
    <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_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <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_ADVERTISE"/>
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
    <uses-permission android:name="android.permission.USB_PERMISSION"/>
    <uses-permission android:name="android.permission.USB_HOST"/>
    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"/>
    <application
        android:name=".MeServiceApplication"
        android:label="Mesh SMS"
        android:hardwareAccelerated="true"
        android:extractNativeLibs="true"
        android:icon="@drawable/icon">
        <activity
            android:name=".MeActivity"
            android:label="Mesh SMS"
            android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
            android:screenOrientation="unspecified"
            android:launchMode="singleTop"
            android:theme="@style/splashScreenTheme"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"/>
            </intent-filter>
            <meta-data
                android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
                android:resource="@xml/device_filter"/>
            <meta-data
                android:name="android.app.lib_name"
                android:value="app"/>
            <meta-data
                android:name="android.app.arguments"
                android:value=""/>
            <meta-data
                android:name="android.app.extract_android_style"
                android:value="minimal"/>
            <meta-data
                android:name="android.app.load_local_jars"
                android:value="jar/QtAndroid.jar:jar/QtAndroidExtras.jar:jar/QtAndroidBluetooth.jar:jar/QtAndroidBearer.jar"/>
            <meta-data
                android:name="android.app.static_init_classes"
                android:value="org.qtproject.qt.android.bluetooth.QtBluetoothBroadcastReceiver"/>
            <meta-data
                android:name="android.app.background_running"
                android:value="true"/>
            <meta-data
                android:name="android.app.splash_screen_drawable"
                android:resource="@drawable/splashscreen"/>
        </activity>

        <service
            android:process=":qt_service"
            android:name=".MeAndroidService"
            android:foregroundServiceType="connectedDevice"
            android:stopWithTask="true"
            android:exported="false">
            <meta-data
                android:name="android.app.lib_name"
                android:value="service"/>
            <meta-data
                android:name="android.app.background_running"
                android:value="true"/>
        </service>
    </application>
</manifest>
