<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.tudarmstadt.informatik.hostage"
    android:versionCode="2"
    android:versionName="1.1" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="19" />

    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <!-- Required to register a SyncStatusObserver to display a "syncing..." progress indicator. -->
    <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
    <!-- Required to enable our SyncAdapter after it's created. -->
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
    <!-- Required because we're manually creating a new account. -->
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
    <!--
    	<uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    -->
    <uses-feature
        android:name="android.hardware.nfc"
        android:required="false" />

    <uses-feature android:name="android.hardware.wifi.direct" android:required="true"/>

    <application
        android:name=".HostageApplication"
        android:allowBackup="true"
        android:allowClearUserData="true"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:installLocation="preferExternal"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:vmSafeMode="true" >
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_lib_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="@string/google_maps_api_key_debug" />

        <activity
            android:name=".ui.activity.MainActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.activity.ProfileEditActivity"
            android:label="Edit Profile" >
        </activity>
        <activity
            android:name=".sync.tracing.TracingSyncActivity"
            android:label="@string/gui_tracing"
            android:theme="@android:style/Theme.Holo.Dialog" >
        </activity>
        <activity
            android:name=".sync.bluetooth.BluetoothSyncActivity"
            android:label="@string/gui_bluetooth"
            android:theme="@android:style/Theme.Holo.Dialog" >
        </activity>
        <activity
            android:name=".sync.nfc.NFCSyncActivity"
            android:label="@string/gui_nfc"
            android:theme="@android:style/Theme.Dialog" >
            <intent-filter>
                <action android:name="android.nfc.action.NDEF_DISCOVERED" />

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

                <data android:mimeType="application/de.tudarmstadt.informatik.hostage" />
            </intent-filter>
        </activity>

        <service
            android:name=".Hostage"
            android:exported="false" >
        </service>
        <service
            android:name=".logging.Logger"
            android:exported="false" >
        </service>
        <service
            android:name=".sync.tracing.TracingSyncService"
            android:exported="false" >
        </service>
        <service
            android:name=".logging.LogExport"
            android:exported="false" >
        </service>

        <provider
            android:name=".provider.HostageContentProvider"
            android:authorities="de.tudarmstadt.informatik.hostage.provider"
            android:exported="false" >
        </provider>

        <provider
            android:name=".sync.android.SyncContentProvider"
            android:authorities="de.tudarmstadt.informatik.hostage.androidsync"
            android:exported="false" />

        <!--<activity
            android:name=".sync.p2p.P2PSyncActivity"
            android:label="@string/title_activity_p2_psync"
            android:parentActivityName=".ui.activity.MainActivity" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="de.tudarmstadt.informatik.hostage.ui.activity.MainActivity" />
        </activity>-->

        <activity
            android:name=".sync.wifi_direct.ui.WiFiP2pSyncActivity"
            android:label="@string/title_activity_p2_psync"
            android:parentActivityName=".ui.activity.MainActivity" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="de.tudarmstadt.informatik.hostage.ui.activity.MainActivity" />
        </activity>

        <service android:name=".sync.android.SyncService"
                 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=".sync.android.HostageAccountService">
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>

            <meta-data android:name="android.accounts.AccountAuthenticator"
                       android:resource="@xml/authenticator" />
        </service>
    </application>

</manifest>