<?xml version="1.0" encoding="utf-8"?>
<manifest
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools">

	<uses-permission android:name="android.permission.INTERNET"/>
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
	<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
	<uses-permission android:name="android.permission.NFC"/>
	<!-- Pre-Android 10 public Downloads writes. Android 10+ uses MediaStore. -->
	<uses-permission
		android:name="android.permission.WRITE_EXTERNAL_STORAGE"
		android:maxSdkVersion="28"/>
	<uses-feature android:name="android.hardware.nfc" android:required="false"/>

	<application
		android:allowBackup="true"
		android:fullBackupContent="@xml/backup_rules"
		android:dataExtractionRules="@xml/data_extraction_rules"
		android:icon="@mipmap/ic_launcher"
		android:label="@string/app_name"
		android:roundIcon="@mipmap/ic_launcher_round"
		android:supportsRtl="true"
		android:theme="@android:style/Theme.Material.NoActionBar">
		<meta-data android:name="com.google.mlkit.vision.DEPENDENCIES" android:value="barcode_ui"/>
		<activity
			android:exported="true"
			android:launchMode="singleTask"
			android:name=".MainActivity">
			<intent-filter>
				<action android:name="android.intent.action.MAIN"/>

				<category android:name="android.intent.category.LAUNCHER"/>
			</intent-filter>
			<!-- Preferred: exact VniDrop invitation MIME type. -->
			<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:mimeType="application/vnd.vnidrop.transfer"/>
			</intent-filter>
			<!-- Fallback: .vnd files often arrive as octet-stream / unknown MIME. -->
			<intent-filter tools:ignore="AppLinkUrlError">
				<action android:name="android.intent.action.VIEW"/>
				<category android:name="android.intent.category.DEFAULT"/>
				<category android:name="android.intent.category.BROWSABLE"/>
				<data android:scheme="content"/>
				<data android:scheme="file"/>
				<data android:mimeType="*/*"/>
				<data android:pathPattern=".*\\.vnd"/>
				<data android:pathPattern=".*\\..*\\.vnd"/>
				<data android:pathPattern=".*\\..*\\..*\\.vnd"/>
				<data android:pathPattern=".*\\..*\\..*\\..*\\.vnd"/>
			</intent-filter>
		</activity>
		<provider
			android:name="androidx.core.content.FileProvider"
			android:authorities="${applicationId}.fileprovider"
			android:exported="false"
			android:grantUriPermissions="true">
			<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
		</provider>
	</application>

</manifest>
