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

    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS"
        tools:ignore="ProtectedPermissions" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.vending.BILLING" />

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.RetroMusic.FollowSystem"
        android:usesCleartextTraffic="false"
        tools:ignore="AllowBackup,GoogleAppIndexingWarning"
        tools:targetApi="m">
        <activity
            android:name=".activities.MainActivity"
            android:theme="@style/SplashTheme"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.MUSIC_PLAYER" />

                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.APP_MUSIC" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data android:scheme="content" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="application/ogg" />
                <data android:mimeType="application/x-ogg" />
                <data android:mimeType="application/itunes" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data android:scheme="file" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="application/ogg" />
                <data android:mimeType="application/x-ogg" />
                <data android:mimeType="application/itunes" />
            </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="http" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="application/ogg" />
                <data android:mimeType="application/x-ogg" />
                <data android:mimeType="application/itunes" />
            </intent-filter>
            <intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW" />

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

                <data android:mimeType="vnd.android.cursor.dir/playlist" />
                <data android:mimeType="vnd.android.cursor.dir/albums" />
                <data android:mimeType="vnd.android.cursor.dir/artists" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.cyanogenmod.eleven.AUDIO_PLAYER" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.PICK" />

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

                <data android:mimeType="vnd.android.cursor.dir/audio" />
            </intent-filter>
        </activity>
        <activity android:name=".activities.AlbumDetailsActivity" />
        <activity android:name=".activities.ArtistDetailActivity" />
        <activity android:name=".activities.PlaylistDetailActivity" />
        <activity android:name=".activities.PlayingQueueActivity" />
        <activity android:name=".activities.AboutActivity" />
        <activity android:name=".activities.tageditor.AlbumTagEditorActivity" />
        <activity android:name=".activities.tageditor.SongTagEditorActivity" />
        <activity android:name=".activities.SettingsActivity" />
        <activity android:name=".activities.LyricsActivity" />
        <activity android:name=".activities.UserInfoActivity" />
        <activity android:name=".activities.SupportDevelopmentActivity" />
        <activity android:name=".activities.GenreDetailsActivity" />
        <activity android:name=".activities.LicenseActivity" />
        <activity android:name=".activities.PurchaseActivity" />
        <activity android:name=".activities.WhatsNewActivity" />
        <activity android:name=".activities.bugreport.BugReportActivity" />

        <activity
            android:name=".activities.SearchActivity"
            android:windowSoftInputMode="stateVisible" />

        <activity
            android:name=".activities.LockScreenActivity"
            android:noHistory="true"
            android:showOnLockScreen="true" />

        <activity
            android:name=".appshortcuts.AppShortcutLauncherActivity"
            android:launchMode="singleInstance"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <activity
            android:name=".activities.saf.SAFGuideActivity"
            android:theme="@style/Theme.Intro" />

        <provider
            android:name=".misc.GenericFileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>


        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>

        <receiver android:name=".service.MediaButtonIntentReceiver">
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </receiver>

        <receiver android:name=".appwidgets.BootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            </intent-filter>
        </receiver>

        <receiver
            android:name=".appwidgets.AppWidgetBig"
            android:exported="false"
            android:label="@string/app_widget_big_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/app_widget_big_info" />
        </receiver>

        <receiver
            android:name=".appwidgets.AppWidgetClassic"
            android:exported="false"
            android:label="@string/app_widget_classic_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/app_widget_classic_info" />
        </receiver>
        <receiver
            android:name=".appwidgets.AppWidgetSmall"
            android:exported="false"
            android:label="@string/app_widget_small_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/app_widget_small_info" />
        </receiver>
        <receiver
            android:name=".appwidgets.AppWidgetText"
            android:exported="false"
            android:label="@string/app_widget_text_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/app_widget_text" />
        </receiver>
        <receiver
            android:name=".appwidgets.AppWidgetCard"
            android:exported="false"
            android:label="@string/app_widget_card_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/app_widget_card_info" />
        </receiver>

        <service
            android:name=".service.MusicService"
            android:enabled="true"
            android:exported="true"
            android:label="@string/app_name"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="android.media.browse.MediaBrowserService" />
            </intent-filter>
        </service>

        <meta-data
            android:name="android.max_aspect"
            android:value="2.1" />

        <meta-data
            android:name="com.lge.support.SPLIT_WINDOW"
            android:value="true" />

        <meta-data
            android:name="code.name.monkey.retromusic.glide.RetroMusicGlideModule"
            android:value="GlideModule" />

        <meta-data
            android:name="com.bumptech.glide.integration.okhttp3.OkHttpGlideModule"
            android:value="GlideModule" />
        <meta-data
            android:name="com.android.vending.splits.required"
            android:value="true" />
    </application>
</manifest>
