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

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

    <permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />

    <application
        android:name="audio.funkwhale.ffa.FFA"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/security"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true">

        <activity
            android:name=".activities.SplashActivity"
            android:launchMode="singleInstance"
            android:noHistory="true">

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

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>

        <activity
            android:name=".activities.LoginActivity"
            android:configChanges="screenSize|orientation"
            android:launchMode="singleInstance" />

        <activity android:name=".activities.MainActivity" />

        <activity
            android:name=".activities.SearchActivity"
            android:launchMode="singleTop" />

        <activity android:name=".activities.DownloadsActivity" />

        <activity android:name=".activities.SettingsActivity" />

        <activity android:name=".activities.LicencesActivity" />

        <service
            android:name=".playback.PlayerService"
            android:foregroundServiceType="mediaPlayback">

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

        </service>

        <service
            android:name=".playback.PinService"
            android:exported="false">

            <intent-filter>
                <action android:name="com.google.android.exoplayer.downloadService.action.RESTART" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

        </service>

        <receiver android:name="androidx.media.session.MediaButtonReceiver">
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </receiver>

    </application>

</manifest>
