<?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="chat.rocket.android">

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

    <application
        android:name=".app.RocketChatApplication"
        android:allowBackup="true"
        android:fullBackupContent="@xml/backup_config"
        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"
        tools:replace="android:name">

        <activity
            android:name=".authentication.ui.AuthenticationActivity"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize">

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

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

            <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:host="auth"
                    android:scheme="rocketchat" />

                <data
                    android:host="go.rocket.chat"
                    android:path="/auth"
                    android:scheme="https" />
            </intent-filter>
        </activity>

        <activity
            android:name=".server.ui.ChangeServerActivity"
            android:theme="@style/AppTheme" />

        <activity
            android:name=".main.ui.MainActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".webview.ui.WebViewActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".webview.sso.ui.SsoWebViewActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".webview.oauth.ui.OauthWebViewActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".chatroom.ui.ChatRoomActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".chatdetails.ui.ChatDetailsActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <activity
            android:name=".chatinformation.ui.MessageInfoActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />

        <!-- TODO: Change to fragment-->
        <activity
            android:name=".settings.password.ui.PasswordActivity"
            android:theme="@style/AppTheme" />

        <activity
            android:name=".userdetails.ui.UserDetailsActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateAlwaysHidden">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".chatroom.ui.ChatRoomActivity" />
        </activity>

        <receiver
            android:name=".push.DirectReplyReceiver"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="chat.rocket.android.ACTION_REPLY" />
            </intent-filter>
        </receiver>

        <service
            android:name=".chatroom.service.MessageService"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="12ac6e94f850aaffcdff52001af77ca415d06a43" />

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