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

    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="29" />

    <uses-feature
        android:name="android.hardware.faketouch"
        android:required="false" />

    <uses-permission
        android:name="android.permission.USE_FINGERPRINT"
        tools:node="remove" />

    <application
        android:name=".App"
        android:allowBackup="true"
        android:appCategory="audio"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_launcher_name"
        android:localeConfig="@xml/locale_config"
        android:requestLegacyExternalStorage="true"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:label">

        <activity
            android:name=".activities.WidgetRecordDisplayConfigureActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            android:theme="@style/MyWidgetConfigTheme">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".helpers.MyWidgetRecordDisplayProvider"
            android:exported="true"
            android:icon="@drawable/ic_microphone_vector">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

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

        <activity
            android:name=".activities.BackgroundRecordActivity"
            android:exported="false"
            android:theme="@style/AppTheme.NoDisplay" />

        <activity
            android:name=".activities.SplashActivity"
            android:exported="false"
            android:theme="@style/SplashTheme" />

        <activity
            android:name=".activities.MainActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.provider.MediaStore.RECORD_SOUND" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

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

        <activity
            android:name=".activities.SettingsActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/settings"
            android:parentActivityName=".activities.MainActivity">

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

        <activity
            android:name="com.simplemobiletools.commons.activities.AboutActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/about"
            android:parentActivityName=".activities.MainActivity" />

        <activity
            android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/customize_colors"
            android:parentActivityName=".activities.SettingsActivity" />

        <service
            android:name=".services.RecorderService"
            android:foregroundServiceType="microphone"
            android:exported="false">
            <intent-filter>
                <action android:name="com.simplemobiletools.voicerecorder.action.GET_RECORDER_INFO" />
                <action android:name="com.simplemobiletools.voicerecorder.action.STOP_AMPLITUDE_UPDATE" />
                <action android:name="com.simplemobiletools.voicerecorder.action.TOGGLE_PAUSE" />
            </intent-filter>
        </service>

        <activity-alias
            android:name=".activities.SplashActivity.Red"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_red"
            android:roundIcon="@mipmap/ic_launcher_red"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Pink"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_pink"
            android:roundIcon="@mipmap/ic_launcher_pink"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Purple"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_purple"
            android:roundIcon="@mipmap/ic_launcher_purple"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Deep_purple"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_deep_purple"
            android:roundIcon="@mipmap/ic_launcher_deep_purple"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Indigo"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_indigo"
            android:roundIcon="@mipmap/ic_launcher_indigo"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Blue"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_blue"
            android:roundIcon="@mipmap/ic_launcher_blue"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Light_blue"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_light_blue"
            android:roundIcon="@mipmap/ic_launcher_light_blue"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Cyan"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_cyan"
            android:roundIcon="@mipmap/ic_launcher_cyan"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Teal"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_teal"
            android:roundIcon="@mipmap/ic_launcher_teal"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Green"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_green"
            android:roundIcon="@mipmap/ic_launcher_green"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Light_green"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_light_green"
            android:roundIcon="@mipmap/ic_launcher_light_green"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Lime"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_lime"
            android:roundIcon="@mipmap/ic_launcher_lime"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Yellow"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_yellow"
            android:roundIcon="@mipmap/ic_launcher_yellow"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Amber"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_amber"
            android:roundIcon="@mipmap/ic_launcher_amber"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Orange"
            android:enabled="true"
            android:exported="true"
            android:icon="@mipmap/ic_launcher"
            android:roundIcon="@mipmap/ic_launcher"
            android:targetActivity=".activities.SplashActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Deep_orange"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_deep_orange"
            android:roundIcon="@mipmap/ic_launcher_deep_orange"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Brown"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_brown"
            android:roundIcon="@mipmap/ic_launcher_brown"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Blue_grey"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_blue_grey"
            android:roundIcon="@mipmap/ic_launcher_blue_grey"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Grey_black"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_grey_black"
            android:roundIcon="@mipmap/ic_launcher_grey_black"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>
    </application>
</manifest>
