A task is a collection of activities that users interact with when trying to do something in your app. These activities are arranged in a stack—the back stack—in the order in which each activity is opened.
Root launcher activities are activities that declare an Intent filter with both ACTION_MAIN and CATEGORY_LAUNCHER. These activities are unique because they act as entry points into your app from the app launcher and are used to start a task.
In this regard, these are the principal
finishOnTaskLaunch And these are the principal intent flags that you can use:
Launch modes allow you to define how a new instance of an activity is associated with the current task.
Using the manifest file
If you have a relatively small collection of key-values that you’d like to save, you should use the SharedPreferences APIs. A SharedPreferences object points to a file containing key-value pairs and provides simple methods to read and write them. Each SharedPreferences file is managed by the framework and can be private or shared.
To write to a shared preferences file, create a SharedPreferences.Editor by calling edit() on your SharedPreferences.
Pass the keys and values you want to write with methods such as putInt() and putString().