I write two simple activities and give them both the category as android.intent.category.LAUNCHER
.
How will the android System decide which activity to launch ? In my test, it was launching the SecondActivity
.
<activity android:name="in.co.madhur.activitiestest.SecondActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="in.co.madhur.activitiestest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>