You can use "android. intent. action. main and Android. intent. category. launcher respectively specifies the action and category for the intent filter to create an activity as the entry to a task. For example:
<Activity...>
<Intent-filter...>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
...
</Activity>
This kind of intent will display the icons and labels of the corresponding activity in the application launcher, provide users with a method to start this activity and return the task it created (Anytime after it is started.
Second, it can be important that the user must be able to leave a task and return the task using the initiator of the activity. For this reason, there are two startup modes for marking activity as the entry to start a task: singletask and singleinstance. They should only be used when the activity has the action_main and category_launcher filters. For example, imagine what would happen if this filter is missing: an intent starts an activity marked with singletask and initializes a new task, the user has spent some time in this task. Then, the user presses the Home button and the task is transferred to the background and no longer displayed. Now, because no icon is displayed in the application launcher, you cannot return to this task.