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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <!-- This matches the Intent that the Launcher app (home screen)
                  sends to launch this activity. If this is commented out, this
                  activity will not ever start & Android Studio will complain
                  that the default activity for this app wasn't found. -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <!-- This filter is redundant, because it's recreated on the Java side
                  when registering the BroadcastReceiver
            <intent-filter>
                <action android:name="android.intent.action.DR" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            -->
        </activity>

        <activity android:name=".EditActivity">
            <!-- When intent sent from MainActivity is explicit, there's no need for this filter.-->
            <intent-filter>
                <action android:name="ASK_NAME" /> <!-- the name can be anything, so long as it matches -->
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <!-- Comment the above filter out to see what happens when MainActivity
                  sends an explicit vs an implicit intent to start EditActivity (in onButtonClick) -->
        </activity>

    </application>

</manifest>