Search code examples
androidandroid-activityandroid-manifest

How to specify which activity starts on app launch?


I have an app with 3 different activities in it. When I launch the app one of the activities always starts first. But I want a differnt activity to start before the one that is currnetly starting first.

How would I change this to make a differnet activity start first?


Solution

  • Open your AnroidManifest.xml file and set the Launching Activity using the intent-filter tag as follows,

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