I followed some tutorials but got confused with "Activity stack" and "Task".
- Because both starts when a new activity is created.
- Activity stack keeps a navigation history of activities, and Task is a sequence of activities.
Is this is only difference that Activity stack made up of one or more task(S)?
Give some example please.
Activities and Tasks
As noted earlier, one activity can start another, including one defined in a different application. Suppose, for example, that you'd like to let users display a street map of some location. There's already an activity that can do that, so all your activity needs to do is put together an Intent object with the required information and pass it to startActivity(). The map viewer will display the map. When the user hits the BACK key, your activity will reappear on screen.
To the user, it will seem as if the map viewer is part of the same application as your activity, even though it's defined in another application and runs in that application's process. Android maintains this user experience by keeping both activities in the same task. Simply put, a task is what the user experiences as an "application." It's a group of related activities, arranged in a stack.
Task = Application = set of activity.