<?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="com.thechiefmeat.freetusky">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE" /> <!-- For notifications -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="22"/> <!-- for day/night mode -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- For sending toots with foreground service -->


    <application
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="FreeTusky"
        android:name="com.thechiefmeat.freetusky.TuskyApplication"
        android:supportsRtl="true"
        android:theme="@style/TuskyTheme">

        <activity
            android:name="com.thechiefmeat.freetusky.SplashActivity"
            android:theme="@style/SplashTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcuts"/>
        </activity>
        <activity
            android:name="com.thechiefmeat.freetusky.SavedTootActivity"
            android:configChanges="orientation|screenSize|keyboardHidden">
        </activity>
        <activity
            android:name="com.thechiefmeat.freetusky.LoginActivity"
            android:windowSoftInputMode="adjustResize">
            <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:host="${applicationId}"
                    android:scheme="@string/oauth_scheme" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.thechiefmeat.freetusky.MainActivity"
            android:configChanges="orientation|screenSize|keyboardHidden">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="video/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND_MULTIPLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND_MULTIPLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="video/*" />
            </intent-filter>
            <meta-data
                android:name="android.service.chooser.chooser_target_service"
                android:value="com.thechiefmeat.freetusky.service.AccountChooserService"
                />
        </activity>
        <activity
            android:name="com.thechiefmeat.freetusky.ComposeActivity"
            android:theme="@style/TuskyDialogActivityTheme"
            android:windowSoftInputMode="stateVisible|adjustResize">
        </activity>
        <activity
            android:name="com.thechiefmeat.freetusky.ViewThreadActivity"
            android:configChanges="orientation|screenSize" />
        <activity android:name="com.thechiefmeat.freetusky.ViewTagActivity" />
        <activity android:name="com.thechiefmeat.freetusky.ViewMediaActivity"
            android:theme="@style/TuskyBaseTheme"
            android:configChanges="orientation|screenSize|keyboardHidden"/>
        <activity android:name="com.thechiefmeat.freetusky.AccountActivity"
            android:configChanges="orientation|screenSize|keyboardHidden"/>
        <activity android:name="com.thechiefmeat.freetusky.EditProfileActivity" />
        <activity android:name="com.thechiefmeat.freetusky.PreferencesActivity" />
        <activity android:name="com.thechiefmeat.freetusky.FavouritesActivity" />
        <activity android:name="com.thechiefmeat.freetusky.AccountListActivity" />
        <activity android:name="com.thechiefmeat.freetusky.AboutActivity" />
        <activity android:name="com.thechiefmeat.freetusky.TabPreferenceActivity" />

        <activity
            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:theme="@style/Base.Theme.AppCompat" />
        <activity
            android:name="com.thechiefmeat.freetusky.SearchActivity"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
        </activity>
        <activity android:name="com.thechiefmeat.freetusky.ListsActivity" />
        <activity android:name="com.thechiefmeat.freetusky.ModalTimelineActivity" />
        <activity android:name="com.thechiefmeat.freetusky.LicenseActivity" />
        <activity android:name="com.thechiefmeat.freetusky.FiltersActivity" />
        <activity android:name="com.thechiefmeat.freetusky.components.report.ReportActivity"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
        <activity android:name="com.thechiefmeat.freetusky.components.instancemute.InstanceListActivity" />

        <receiver android:name="com.thechiefmeat.freetusky.receiver.NotificationClearBroadcastReceiver" />

        <receiver
            android:name="com.thechiefmeat.freetusky.receiver.SendStatusBroadcastReceiver"
            android:enabled="true"
            android:exported="false" />

        <service
            tools:targetApi="24"
            android:name="com.thechiefmeat.freetusky.service.TuskyTileService"
            android:icon="@drawable/ic_tusky"
            android:label="Compose Toot"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE" />
            </intent-filter>
        </service>
        <service android:name="com.thechiefmeat.freetusky.service.SendTootService" />
        <service
            tools:targetApi="23"
            android:name="com.thechiefmeat.freetusky.service.AccountChooserService"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
            >
            <intent-filter>
                <action android:name="android.service.chooser.ChooserTargetService" />
            </intent-filter>
        </service>

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

</manifest>
