<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	android:allowAudioPlaybackCapture="true"
	android:installLocation="preferExternal">
	<!-- OpenGL ES 1.1 -->
	<uses-feature android:glEsVersion="0x00010000" />
	<!-- Touchscreen support -->
	<uses-feature
		android:name="android.hardware.touchscreen"
		android:required="false" />
	<!-- Game controller support -->
	<uses-feature
		android:name="android.hardware.bluetooth"
		android:required="false" />
	<uses-feature
		android:name="android.hardware.gamepad"
		android:required="false" />
	<uses-feature
		android:name="android.hardware.usb.host"
		android:required="false" />
	<!-- External mouse input events -->
	<uses-feature
		android:name="android.hardware.type.pc"
		android:required="false" />
	<!-- Audio recording support -->
	<uses-feature
		android:name="android.hardware.microphone"
		android:required="false" />
	<!-- Allow downloading to the external storage on Android 5.1 and older -->
	<uses-permission
		android:name="android.permission.WRITE_EXTERNAL_STORAGE"
		android:maxSdkVersion="29" />
	<uses-permission
		android:name="android.permission.READ_EXTERNAL_STORAGE"
		android:maxSdkVersion="29" />
	<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
	<!-- Allow access to Bluetooth devices -->
	<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
	<uses-permission
		android:name="android.permission.BLUETOOTH"
		android:maxSdkVersion="30" />
	<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
	<!-- Allow access to the vibrator -->
	<uses-permission android:name="android.permission.VIBRATE" />
	<!-- Allow recording audio -->
	<uses-permission android:name="android.permission.RECORD_AUDIO" />
	<!-- Allow internet access -->
	<uses-permission android:name="android.permission.INTERNET" />
	<!-- Dedicated server -->
	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

	<application
		android:name=".MainApplication"
		android:allowBackup="true"
		android:hardwareAccelerated="true"
		android:icon="@mipmap/ic_launcher"
		android:label="@string/app_name"
		android:roundIcon="@mipmap/ic_launcher"
		android:theme="@style/Theme.App"
		android:usesCleartextTraffic="true"
		android:requestLegacyExternalStorage="true">
		<activity
			android:name=".MainActivity"
			android:exported="true">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />

				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
		</activity>
		<activity
			android:name=".XashActivity"
			android:alwaysRetainTaskState="true"
			android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation|touchscreen"
			android:exported="true"
			android:launchMode="singleTask"
			android:preferMinimalPostProcessing="true"
			android:windowSoftInputMode="adjustResize">
			<intent-filter>
				<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
			</intent-filter>
		</activity>
	</application>
	<queries>
		<intent>
			<action android:name="su.xash.engine.MOD" />
		</intent>
	</queries>
</manifest>
