<?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.NFC" />

    <uses-feature android:name="android.hardware.nfc" android:required="false" />
    <uses-feature android:name="android.hardware.usb.host" android:required="false" />

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Authnkey"
        tools:targetApi="34">

        <!-- Main Activity -->
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:configChanges="keyboard|keyboardHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Credential Provider Activity -->
        <activity
            android:name=".CredentialProviderActivity"
            android:exported="false"
            android:launchMode="singleTop"
            android:taskAffinity=".credential"
            android:configChanges="keyboard|keyboardHidden"
            android:theme="@style/Theme.Authnkey.Transparent" />

        <!-- Credential Provider Service (Android 14+) -->
        <service
            android:name=".AuthnkeyCredentialService"
            android:enabled="true"
            android:exported="true"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE">
            <intent-filter>
                <action android:name="android.service.credentials.CredentialProviderService" />
            </intent-filter>
            <meta-data
                android:name="android.credentials.provider"
                android:resource="@xml/credential_provider_config" />
        </service>

    </application>

</manifest>
