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

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

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:ignore="AllowBackup,GoogleAppIndexingWarning">

        <activity android:name=".sample.MainActivity">
            <!-- launcher intent -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <!-- local deeplink (with custom scheme) -->
            <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:scheme="${deeplink_scheme}" />
            </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="noties.io"
                    android:scheme="https" />

                <data android:pathPrefix="/Markwon/app"/>

                <data android:pathPattern="sample/.*" />
                <data android:pathPattern="search" />

            </intent-filter>
        </activity>

        <activity
            android:name=".readme.ReadMeActivity"
            android:exported="true">

            <!-- github markdown files handling -->
            <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="github.com"
                    android:scheme="https" />

                <data android:pathPattern=".*\\.md" />
                <data android:pathPattern=".*\\..*\\.md" />
                <data android:pathPattern=".*\\..*\\..*\\.md" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.md" />

            </intent-filter>
        </activity>

    </application>

</manifest>