In the Android manifest file, what do you mean by the category Launcher and action MAIN
category android:name="android.intent.category.LAUNCHER"
action android:name="android.intent.action.MAIN"
Is it possible to make one activity the laucher and another one the main action?
Extending the answer of Balaji, I'll add-up a few things:
For the starters, there could be multiple points of entry to an app. Let's suppose our app has two activities for simplicity.
You can keep the <intent-filter>
tag in both activities and contain MAIN
as well as LAUNCHER
into it. This would create two launchers of the app - and two identical app icons could be physically seen at your app-launcher. You click on one icon - and it'll start one of the activities. You click the other, and it'll start the other activity.
However, if you drop either of MAIN
or LAUNCHER
tag from the the second activity, there'll be only one physical launcher for the app which launches the first activity.
Having said that,
MAIN
in an activity is used to tell that when the app starts, it'll start with this very activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With