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

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

    <uses-feature android:name="android.hardware.camera.any" />

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:supportsRtl="true"
        android:theme="@style/CarnetTheme.White">

        <!-- Widget Simple -->
        <receiver
            android:name=".widget.SimpleWidgetProvider"
            android:description="@string/add_widget"
            android:icon="@drawable/ic_launcher"
            android:exported="true"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/appwidget_simple" />
        </receiver>
        <!-- Widget List -->
        <receiver
            android:name=".widget.ListWidgetProvider"
            android:exported="true"
            android:description="@string/add_widget"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

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

        <service
            android:name=".widget.ListWidgetService"
            android:permission="android.permission.BIND_REMOTEVIEWS" />

        <activity android:name=".utils.WebActivity" />
        <activity
            android:name=".databases.NoteExporter"
            android:theme="@style/Theme.Transparent" />

        <receiver
            android:name=".BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <service android:name=".noise.NoiseService" />
        <service android:name=".synchro.SynchroService" />
        <service
            android:name=".synchro.googledrive.MyDriveEventService"
            android:exported="true">
            <intent-filter>
                <action android:name="com.google.android.gms.drive.events.HANDLE_EVENT" />
            </intent-filter>
        </service>
        <service android:name=".FileManagerService" />
        <service android:name=".AudioService" />
        <service android:name=".editor.recorder.AudioRecorderJS" />

        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:exported="true"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

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

                <data android:mimeType="text/plain" />
            </intent-filter>
        </activity>

        <receiver android:name=".HomeReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <service android:name=".FloatingService" />

        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings" />
        <activity
            android:name=".HelpAuthorizeFloatingWindowActivity"
            android:label="@string/title_activity_help_authorize_floating_window" />
        <activity
            android:name="com.spisoft.sync.wrappers.googledrive.AuthorizeActivity"
            android:theme="@style/Theme.Transparent" />
        <activity
            android:name=".intro.HelpActivity"
            android:label="@string/title_activity_help"
            android:theme="@style/CarnetTheme.White" />

        <service
            android:name=".databases.DBMergerService$DBMergerJobService"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <service android:name="com.spisoft.sync.synchro.SynchroService" />
        <service
            android:name=".databases.CacheBuilderIntentService"
            android:enabled="true" />
        <service
            android:name=".databases.DBMergerService$DBMergerIntentService"
            android:enabled="true" />

        <activity android:name="com.spisoft.sync.account.AccountListActivity" />
        <activity android:name="com.spisoft.sync.account.AccountTypeActivity" />
        <activity
            android:name=".synchro.AccountConfigActivity"
            android:label="@string/title_activity_account_config"
            android:theme="@style/CarnetTheme.White" />
        <activity android:name=".updater.UpdaterActivity" />
        <activity
            android:name="com.spisoft.sync.wrappers.nextcloud.CertificateActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:launchMode="singleTask"
            android:screenOrientation="user"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity android:name=".editor.ShareEditorActivity"></activity>
        <activity
            android:name=".editor.ImageActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ChangelogActivity"
            android:exported="true" />
        <activity
            android:name=".WebBasedActivity"
            android:exported="true" />

        <receiver android:name=".reminders.NotificationPublisher" />
    </application>

</manifest>