We mention android.intent.action.MAIN
and android.intent.category.LAUNCHER
as Intent filter of the launcher activity in the Manifest.xml
. What is imp. of these two? What are their functionality?

- 8,698
- 22
- 91
- 148
4 Answers
From the docs:
category -- Gives additional information about the action to execute. For example, CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level application, while CATEGORY_ALTERNATIVE means it should be included in a list of alternative actions the user can perform on a piece of data.
MAIN means that this activity is the entry point of the application, i.e. when you launch the application, this activity is created.

- 135,866
- 28
- 264
- 277
-
1What will happen if I mention this intent-filter block twice? – dev_android Jun 09 '11 at 06:24
-
Seems like the first one to be declared will be the main, but seems like undefined behavior for me. Interesting though... – MByD Jun 09 '11 at 06:30
-
Two activities with same intent filters, then the user is notified to select the correct activity. - dev_andriod – Ajay Takur Sep 24 '13 at 08:08
-
7What does top-level application launcher mean? – Xegara Jul 20 '16 at 15:28
-
Answering @Xegara it refers to the screen where your app icons appear and you launch one of them – HamzaFarooq Oct 12 '21 at 07:10
MAIN
action is the main entry point of the application.
LAUNCHER
category says that entry point should be listed in the application launcher.

- 3,903
- 6
- 31
- 57
MAIN : will start the activity home.This activity will be the Home page of the application.
CATEGORY_LAUNCHER : The activity can be the initial activity of a task and is listed in the top-level application launcher.

- 1,120
- 2
- 11
- 20
MAIN: the activity is the main entry point to the application i.e., the first activity to start when application starts
LAUNCHER: the activity will appear in top-level application launcher (where app icons appear and user can launch one of them).
Additionally, If two activites in an application have MAIN and LAUNCHER, then two icons will start appearing in top-level application launcher. Where each icon corresponds to each app activity

- 429
- 1
- 4
- 16