How to declare that an Android activity is a launcher activity

The following source code shows how to declare that an Android activity is the launcher activity for your application:

<activity android:name=".MyMainActivity" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
<activity
    android:name=".SomeOtherActivity"
    android:label="@string/app_name" >
</activity>

This code should be placed in your AndroidManifest.xml file, and it declares that a Java class named MyMainActivity is the launcher activity for your Android application. (I assume that you already know about that file and just needed to see this syntax, so I won’t explain any more about this here.)