<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.microphone"
        android:required="false" />
    <uses-feature 
        android:name="android.hardware.gamepad" 
        android:required="false"/>
    <uses-feature
        android:name="android.software.leanback" 
        android:required="false" />

    <application
        android:name="com.reicast.emulator.Emulator"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:roundIcon="@drawable/ic_launcher"
        android:banner="@drawable/ic_banner"
        android:logo="@drawable/ic_banner"
        android:hardwareAccelerated="true"
        android:appCategory="game"
        android:isGame="true"
		android:requestLegacyExternalStorage="true">

        <meta-data android:name="android.max_aspect" android:value="2.1" />
        <activity
            android:name="com.reicast.emulator.NativeGLActivity"
            android:configChanges="orientation|navigation|screenSize|screenLayout|uiMode|keyboard|keyboardHidden"
            android:screenOrientation="sensorLandscape"
            android:exported="true"
            android:theme="@style/Theme.AppCompat.NoActionBar"/>
        <activity-alias
            android:name="com.reicast.emulator.MainActivity"
            android:targetActivity="com.reicast.emulator.NativeGLActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="tv.ouya.intent.category.GAME" />
                <category android:name="android.intent.category.LEANBACK_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:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.GDI"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.gdi"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.CHD"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.chd"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.CDI"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.cdi"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.CUE"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.cue"
					android:scheme="file" />

				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.LST"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.lst"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.BIN"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.bin"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.DAT"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.dat"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.ZIP"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.zip"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.7Z"
					android:scheme="file" />
				<data
					android:host="*"
					android:mimeType="*/*"
					android:pathPattern=".*\\.7z"
					android:scheme="file" />
			</intent-filter>
        </activity-alias>
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>

    </application>

</manifest>
