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

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

    <application
        android:name=".AletheiaApplication"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Aletheia">
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.files"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <service
            android:name=".audiobook.AudioBookGenerationService"
            android:exported="false"
            android:foregroundServiceType="specialUse">
            <property
                android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
                android:value="User-requested audiobook upload, remote progress monitoring, and M4A download" />
        </service>

        <activity
            android:name=".ui.reader.ReaderActivity"
            android:configChanges="orientation|screenSize|smallestScreenSize"
            android:exported="false"
            android:theme="@style/Theme.Aletheia"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".ui.audiobook.AudioBookPlayerActivity"
            android:exported="false"
            android:theme="@style/Theme.Aletheia" />
        <activity
            android:name=".ui.qbooks.BookDetailActivity"
            android:exported="false"
            android:theme="@style/Theme.Aletheia" />
        <activity
            android:name=".ui.main.MainActivity"
            android:exported="true"
            android:theme="@style/Theme.Aletheia">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <receiver
            android:name="xyz.kusoft.argusupdater.ArgusPackageInstallerStatusReceiver"
            android:exported="false" />
    </application>

</manifest>
