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

  <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="com.github.apognu.otter.Otter"
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    android:usesCleartextTraffic="true">

    <activity
      android:name="com.github.apognu.otter.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="com.github.apognu.otter.activities.LoginActivity"
      android:configChanges="screenSize|orientation"
      android:launchMode="singleInstance" />
    <activity android:name="com.github.apognu.otter.activities.MainActivity" />
    <activity
      android:name="com.github.apognu.otter.activities.SearchActivity"
      android:launchMode="singleTop" />
    <activity android:name="com.github.apognu.otter.activities.DownloadsActivity" />
    <activity android:name="com.github.apognu.otter.activities.SettingsActivity" />
    <activity android:name="com.github.apognu.otter.activities.LicencesActivity" />

    <service android:name="com.github.apognu.otter.playback.PlayerService" />

    <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="com.github.apognu.otter.playback.MediaControlActionReceiver" />

  </application>

</manifest>