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

        <activity
            android:name=".authentication.ui.AuthenticationActivity"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:theme="@style/AuthenticationTheme"
            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/AuthenticationTheme" />

        <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" />

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

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

        <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=".push.FirebaseTokenService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <service
            android:name=".push.FirebaseMessagingService"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <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" />
    </application>

</manifest>