<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:banner="@drawable/banner"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:usesCleartextTraffic="true"
        android:theme="@style/AppTheme">

        <activity
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
            android:name=".MainActivity"
            android:label="@string/title_activity_main"
            android:theme="@style/AppTheme.NoActionBarLaunch"
            android:launchMode="singleTask"
            android:exported="true">
            <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>

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="materialious-auth" />
            </intent-filter>

            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                        android:scheme="https"
                        android:host="youtube.com"
                        android:pathPrefix="/watch" />
                <data
                        android:scheme="https"
                        android:host="www.youtube.com"
                        android:pathPrefix="/watch" />
                <data
                        android:scheme="https"
                        android:host="m.youtube.com"
                        android:pathPrefix="/watch" />
                <data
                        android:scheme="https"
                        android:host="youtu.be"
                        android:pathPrefix="/watch" />
                <data
                        android:scheme="https"
                        android:host="youtube.com"
                        android:pathPrefix="/shorts" />
                <data
                        android:scheme="https"
                        android:host="www.youtube.com"
                        android:pathPrefix="/shorts" />
                <data
                        android:scheme="https"
                        android:host="m.youtube.com"
                        android:pathPrefix="/shorts" />
                <data
                        android:scheme="https"
                        android:host="youtu.be"
                        android:pathPrefix="/shorts" />
            </intent-filter>
        </activity>
    </application>

    <!-- Permissions -->

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
    <uses-permission android:name="android.permission.CAMERA" tools:node="remove" />
</manifest>
