<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.

     This file is part of Xabber project; you can redistribute it and/or
     modify it under the terms of the GNU General Public License, Version 3.

     Xabber is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.

     You should have received a copy of the GNU General Public License,
     along with this program. If not, see http://www.gnu.org/licenses/.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xabber.androiddev">

    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.location" android:required="false" />
    <uses-feature android:name="android.hardware.location.gps" android:required="false" />

    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:label="@string/application_name"
        android:icon="@drawable/ic_launcher"
        android:name="com.xabber.android.data.Application"
        android:theme="@style/Theme"
        android:allowBackup="true">
        <activity
            android:label="@string/application_name"
            android:name="com.xabber.android.ui.ContactList"
            android:launchMode="singleTop"
            >
            <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.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="xmpp" />
            </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>
            <intent-filter>
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="imto" />
                <data android:host="jabber" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="imto" />
                <data android:host="gtalk" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.xabber.android.ui.LoadActivity"
            />
        <activity
            android:label="@string/about_viewer"
            android:name="com.xabber.android.ui.preferences.AboutViewer"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor"
            >

            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>
        <activity
            android:label="@string/preference_accounts"
            android:name="com.xabber.android.ui.preferences.AccountList"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>
        <activity
            android:label="@string/account_editor"
            android:name="com.xabber.android.ui.preferences.AccountEditor"
            android:parentActivityName="com.xabber.android.ui.preferences.AccountList"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.AccountList" />
        </activity>
        <activity
            android:label="@string/occupant_list"
            android:name="com.xabber.android.ui.OccupantList"
            android:parentActivityName="com.xabber.android.ui.ChatViewer"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ChatViewer" />

        </activity>
        <activity
            android:label="@string/chat_viewer"
            android:name="com.xabber.android.ui.ChatViewer"
            android:windowSoftInputMode="adjustResize"
            android:launchMode="singleTop"
            android:parentActivityName="com.xabber.android.ui.ContactList"
            >

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

            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ContactList" />

        </activity>
        <activity
            android:label="@string/contact_editor"
            android:name="com.xabber.android.ui.GroupEditor"
            android:parentActivityName="com.xabber.android.ui.ContactViewer"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ContactViewer" />
        </activity>
        <activity
            android:label="@string/contact_add"
            android:name="com.xabber.android.ui.ContactAdd"
            android:parentActivityName="com.xabber.android.ui.preferences.AccountList"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.AccountList" />
        </activity>
        <activity
            android:label="@string/account_add"
            android:name="com.xabber.android.ui.AccountAdd"
            android:parentActivityName="com.xabber.android.ui.preferences.AccountList"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.AccountList" />
        </activity>
        <activity
            android:label="@string/account_oauth"
            android:name="com.xabber.android.ui.OAuthActivity"
            />
        <activity
            android:label="@string/muc_add"
            android:name="com.xabber.android.ui.MUCEditor"
            android:parentActivityName="com.xabber.android.ui.ContactList"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ContactList" />
        </activity>
        <activity
            android:label="@string/status_editor"
            android:name="com.xabber.android.ui.StatusEditor"
            android:parentActivityName="com.xabber.android.ui.ContactList"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ContactList" />
        </activity>
        <activity
            android:label="@string/preference_editor"
            android:name="com.xabber.android.ui.preferences.PreferenceEditor"
            android:parentActivityName="com.xabber.android.ui.ContactList"
            >

            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ContactList" />
        </activity>

        <activity
            android:label="@string/chat_settings"
            android:name="com.xabber.android.ui.preferences.ChatEditor"
            android:parentActivityName="com.xabber.android.ui.ChatViewer"
            >

            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ChatViewer" />
        </activity>

        <activity
            android:label="@string/contact_viewer"
            android:name="com.xabber.android.ui.ContactViewer"
            android:parentActivityName="com.xabber.android.ui.ChatViewer"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ChatViewer" />

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="@string/contact_viewer_mime_type" />
                <data android:scheme="content" />
                <data android:host="com.android.contacts" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.xabber.android.ui.FingerprintViewer"
            android:label="@string/otr_verify_fingerprint"
            android:parentActivityName="com.xabber.android.ui.ChatViewer"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ChatViewer" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.QuestionViewer"
            android:label="@string/otr_verify_fingerprint"
            android:parentActivityName="com.xabber.android.ui.ChatViewer"
            >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.ChatViewer" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.ContactSubscription"
            />
        <activity
            android:name="com.xabber.android.ui.MUCInvite"
            />
        <activity
            android:name="com.xabber.android.ui.CertificateConfirmation"
            />
        <activity
            android:name="com.xabber.android.ui.PasswordRequest"
            />
        <activity
            android:name="com.xabber.android.ui.ArchiveRequest"
            />
        <activity
            android:name="com.xabber.android.ui.preferences.PhraseList"
            android:label="@string/events_phrases_title"
            android:parentActivityName="com.xabber.android.ui.preferences.NotificationsSettings">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.NotificationsSettings" />
        </activity>
        <activity
            android:name="com.xabber.android.ui.preferences.PhraseEditor"
            android:parentActivityName="com.xabber.android.ui.preferences.PhraseList">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PhraseList" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.PhraseAdder"
            android:parentActivityName="com.xabber.android.ui.preferences.PhraseList">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PhraseList" />
        </activity>


        <activity
            android:name="com.xabber.android.ui.ReconnectionActivity"
            />
        <activity
            android:label="ClearNotifications"
            android:name="com.xabber.android.ui.ClearNotifications"
            android:taskAffinity=""
            android:launchMode="singleInstance"
            android:noHistory="true"
            android:stateNotNeeded="true"
            android:excludeFromRecents="true"
            />

        <activity
            android:name="com.xabber.android.ui.preferences.ThemeSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.ContactListSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.ChatSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.NotificationsSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.ConnectionSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.SecuritySettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <activity
            android:name="com.xabber.android.ui.preferences.DebugSettings"
            android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
        </activity>

        <service android:name="com.xabber.android.service.XabberService" />
        <service
            android:name="com.xabber.android.service.SyncAdapterService"
            android:exported="true">
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>
            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter"
                />
        </service>
        <service
            android:name="com.xabber.android.service.AccountAuthenticatorService"
            android:exported="true">
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" />
        </service>
        <receiver
            android:name="com.xabber.android.receiver.BootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <receiver android:name="com.xabber.android.receiver.GoAwayReceiver" />
        <receiver android:name="com.xabber.android.receiver.GoXaReceiver" />
        <receiver android:name="com.xabber.android.receiver.ComposingPausedReceiver" />
    </application>
</manifest>