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?
action : Declares the intent action accepted, in the name attribute. The value must be the literal string value of an action, not the class constant. category: Declares the intent category accepted, in the name attribute. The value must be the literal string value of an action, not the class constant.
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.
action. MAIN means that this activity is the entry point of the application, i.e. when you launch the application, this activity is created.
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.
MAIN
action is the main entry point of the application.
LAUNCHER
category says that entry point should be listed in the application launcher.
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