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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

    <application
        android:name=".AndroidApp"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AndroidApp">
        <!-- Disable Firebase analytics until the user has given consent -->
        <meta-data
            android:name="firebase_analytics_collection_enabled"
            android:value="false" />

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:windowSoftInputMode="adjustPan|adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <!-- MIME Type registration -->
            <intent-filter>
                <data
                    android:mimeType="application/eap-config"
                    android:pathPattern=".*\\.eap-config"
                    android:scheme="content" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter>
                <data
                    android:mimeType="application/octet-stream"
                    android:pathPattern=".*\\.eap-config"
                    android:scheme="content" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>

        </activity>

        <activity
            android:name="net.openid.appauth.RedirectUriReceiverActivity"
            android:exported="true">
            <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:scheme="app.eduroam.geteduroam" />
            </intent-filter>
        </activity>

        <activity
            android:name=".webview_fallback.WebViewDataHandlingActivity"
            android:exported="false"
            android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden"
            android:launchMode="singleTask"
            android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar"/>

    </application>

</manifest>