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

    <!-- TV-specific features -->
    <uses-feature
        android:name="android.software.leanback"
        android:required="true" />
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />

    <!-- Permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:banner="@drawable/app_banner"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/Theme.StreamFlixTV"
        android:usesCleartextTraffic="true">

        <!-- Splash Screen -->
        <activity
            android:name=".SplashActivity"
            android:exported="true"
            android:screenOrientation="landscape"
            android:theme="@style/Theme.StreamFlixTV">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Main Browse Activity -->
        <activity
            android:name=".MainActivity"
            android:exported="false"
            android:screenOrientation="landscape" />

        <!-- Details Activity -->
        <activity
            android:name=".ui.details.DetailsActivity"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@style/Theme.StreamFlixTV.Details" />

        <!-- Playback Activity -->
        <activity
            android:name=".ui.playback.PlaybackActivity"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@style/Theme.StreamFlixTV.Playback" />

        <!-- Search Activity -->
        <activity
            android:name=".ui.search.SearchActivity"
            android:exported="true"
            android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
        </activity>

    </application>

</manifest>
