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

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>
    <uses-permission android:name="android.permission.VIBRATE"/>

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_launcher_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
            android:name=".activities.SplashActivity"
            android:theme="@style/SplashTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

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

        <activity
            android:name=".activities.MainActivity"
            android:resizeableActivity="true">

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

                <data android:mimeType="image/*"/>
                <data android:mimeType="video/*"/>
                <data android:mimeType="vnd.android.cursor.dir/image"/>
                <data android:mimeType="vnd.android.cursor.dir/video"/>
            </intent-filter>

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

                <category android:name="android.intent.category.OPENABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="image/*"/>
                <data android:mimeType="video/*"/>
                <data android:mimeType="vnd.android.cursor.dir/image"/>
                <data android:mimeType="vnd.android.cursor.dir/video"/>
            </intent-filter>
        </activity>

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

        <activity
            android:name=".activities.ViewPagerActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:parentActivityName=".activities.MediaActivity"
            android:theme="@style/FullScreenTheme">

            <intent-filter>
                <action android:name="com.android.camera.action.REVIEW"/>

                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="image/*"/>
                <data android:mimeType="video/*"/>
            </intent-filter>
        </activity>

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

        <activity
            android:name="com.simplemobiletools.commons.activities.LicenseActivity"
            android:label="@string/third_party_licences"
            android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/>

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

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

        <activity
            android:name=".activities.PhotoVideoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FullScreenTheme"/>

        <activity
            android:name=".activities.IncludedFoldersActivity"
            android:label="@string/include_folders"
            android:parentActivityName=".activities.SettingsActivity"/>

        <activity
            android:name=".activities.ExcludedFoldersActivity"
            android:label="@string/excluded_folders"
            android:parentActivityName=".activities.SettingsActivity"/>

        <activity
            android:name=".activities.PhotoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FullScreenTheme">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="image/*"/>
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.VideoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FullScreenTheme">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="video/*"/>
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.EditActivity"
            android:label="@string/editor">
            <intent-filter>
                <action android:name="android.intent.action.EDIT"/>

                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="image/*"/>
            </intent-filter>

            <intent-filter>
                <action android:name="com.android.camera.action.CROP"/>

                <data android:scheme="content"/>
                <data android:scheme="file"/>
                <data android:mimeType="image/*"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.ALTERNATIVE"/>
                <category android:name="android.intent.category.SELECTED_ALTERNATIVE"/>
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.SetWallpaperActivity"
            android:label="@string/simple_wallpaper">
            <intent-filter>
                <action android:name="android.intent.action.ATTACH_DATA"/>

                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="image/*"/>
            </intent-filter>

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

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

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

        <receiver
            android:name=".receivers.InstallReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER"/>
            </intent-filter>
        </receiver>
    </application>
</manifest>
