<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
	android:versionCode="61" android:versionName="@string/build_revision" package="org.yaxim.androidclient">

	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.NFC" />
	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
	<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
	<uses-permission android:name="android.permission.VIBRATE" />
	<uses-permission android:name="android.permission.WAKE_LOCK" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

	<application android:icon="@drawable/icon"
		android:name=".YaximApplication"
		android:theme="@style/YaximDarkTheme"
		android:supportsRtl="true"
		android:label="@string/app_name">

		<uses-library android:name="org.apache.http.legacy" android:required="false"/>

		<activity android:name=".MainWindow" android:label="@string/app_name"
			android:launchMode="singleTask"
			android:clearTaskOnLaunch="true"
			android:configChanges="orientation|keyboardHidden|screenSize">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
			<intent-filter android:icon="@drawable/icon" android:label="@string/app_name">
				<action android:name="android.intent.action.SEND"></action>
				<category android:name="android.intent.category.DEFAULT"></category>
				<data android:mimeType="text/*"></data>
			</intent-filter>
			<intent-filter android:icon="@drawable/icon" android:label="@string/app_name">
				<action android:name="android.intent.action.SEND"></action>
				<category android:name="android.intent.category.DEFAULT"></category>
				<data android:mimeType="*/*"></data>
			</intent-filter>
			<intent-filter android:icon="@drawable/icon" android:label="@string/Menu_addFriend">
				<action android:name="android.intent.action.SENDTO" />
				<category android:name="android.intent.category.DEFAULT" />
				<category android:name="android.intent.category.BROWSABLE" />
				<data android:host="jabber" android:scheme="imto" />
			</intent-filter>
			<intent-filter android:icon="@drawable/icon" android:label="@string/Menu_addFriend">
				<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 android:icon="@drawable/icon" android:label="@string/Menu_addFriend">
				<action android:name="android.intent.action.VIEW" />
				<category android:name="android.intent.category.DEFAULT" />
				<category android:name="android.intent.category.BROWSABLE" />
				<data android:scheme="https" android:host="yax.im" android:pathPrefix="/i/" />
				<data android:scheme="https" android:host="yax.im" android:pathPrefix="/j/" />
				<data android:scheme="https" android:host="conversations.im" android:pathPrefix="/i/" />
				<data android:scheme="https" android:host="conversations.im" android:pathPrefix="/j/" />
			</intent-filter>
			<intent-filter android:icon="@drawable/icon" android:label="@string/Menu_addFriend">
				<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
				<category android:name="android.intent.category.DEFAULT"/>
				<data android:scheme="xmpp"/>
			</intent-filter>
		</activity>

		<activity android:name=".chat.ChatWindow" android:label="@string/app_name"
			android:parentActivityName=".MainWindow"
			android:configChanges="orientation|keyboardHidden|screenSize"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".MainWindow"/>
		</activity>

		<activity android:name=".chat.MUCChatWindow" android:label="@string/app_name"
			android:parentActivityName=".MainWindow"
			android:configChanges="orientation|keyboardHidden|screenSize"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".MainWindow"/>
		</activity>

		<activity android:name=".list.EntityListActivity" android:label="@string/app_name"
			android:parentActivityName=".MainWindow"
			android:configChanges="orientation|keyboardHidden|screenSize"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".MainWindow"/>
		</activity>
		<activity android:name=".list.ServiceDiscoveryActivity" android:label="@string/title_service_disco"
			android:parentActivityName=".MainWindow"
			android:configChanges="orientation|keyboardHidden|screenSize"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".MainWindow"/>
		</activity>
		<activity android:name=".list.SearchActivity" android:label="@string/Menu_muc"
			android:parentActivityName=".MainWindow"
			android:configChanges="orientation|keyboardHidden|screenSize"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".MainWindow"/>
		</activity>
		<activity android:name=".preferences.MainPrefs"
			android:label="@string/Menu_Settings">
		</activity>

		<activity android:name=".preferences.AccountPrefs"
			android:label="@string/account_settings_title">
		</activity>

		<activity android:name=".preferences.NotificationPrefs"
				  android:label="@string/preftitle_notify">
		</activity>

		<service android:name=".service.XMPPService">
			<intent-filter>
				<action android:name="de.hdmstuttgart.yaxim.XMPPSERVICE" />
			</intent-filter>
		</service>

		<receiver android:name=".service.YaximBroadcastReceiver" android:exported="false">
			<intent-filter>
				<action android:name="android.intent.action.ACTION_SHUTDOWN" />
				<action android:name="android.intent.action.BOOT_COMPLETED" />
				<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
			</intent-filter>
			<intent-filter>
				<action android:name="org.yaxim.androidclient.ACTION_MESSAGE_HEARD" />
				<action android:name="org.yaxim.androidclient.ACTION_MESSAGE_REPLY" />
			</intent-filter>
		</receiver>
		<receiver android:name=".service.InstallReferrerReceiver"
				android:enabled="true"
				android:exported="true">
			<intent-filter>
				<action android:name="com.android.vending.INSTALL_REFERRER"/>
			</intent-filter>
		</receiver>

		<provider android:name=".data.ChatProvider"
			android:exported="false"
			android:authorities="${applicationId}.provider.Chats" />
		<provider android:name=".data.RosterProvider"
			android:exported="false"
			android:authorities="${applicationId}.provider.Roster" />
		<provider
			android:name="android.support.v4.content.FileProvider"
			android:authorities="${applicationId}.provider.Files"
			android:exported="false"
			android:grantUriPermissions="true">
			<meta-data
				android:name="android.support.FILE_PROVIDER_PATHS"
				android:resource="@xml/provider_paths"/>
		</provider>

		<activity android:name="de.duenndns.ssl.MemorizingActivity" />

		<meta-data android:name="com.google.android.gms.car.application"
			android:resource="@xml/automotive_app_desc" />
	</application>
</manifest>
