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

    <uses-feature android:name="android.software.leanback" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.bluetooth" android:required="false" />

    <!-- Switching Bluetooth and opening the TV's pairing screen: BLUETOOTH_CONNECT on Android 12 and newer (asked
         for once, with Android's own prompt), the two install-time permissions on Android 8 to 11. -->
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />

    <application
        android:allowBackup="false"
        android:banner="@drawable/banner"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/Panel">

        <activity
            android:name=".ToggleActivity"
            android:exported="true"
            android:excludeFromRecents="true"
            android:launchMode="singleTask"
            android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
            <!-- Clean Your TV module card (docs/specs/card.md): the tile shows as "Bluetooth Toggle" once the owner says Show. -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.gathin.tvhome.category.DOCK_CARD" />
            </intent-filter>
            <meta-data android:name="com.gathin.tvhome.card" android:resource="@xml/module_card" />
        </activity>
    </application>
</manifest>
