A task is a group of components that work in concert together to fulfill a goal for a user (not necessarily a very specific goal, but a goal nonetheless). This is what the user sees as an application.
There is a music player that allows the user to control and play songs. It may include various actions that display album / artist / song metadata, playback controls, organization of playlists, etc. It may also include services that implement playback and that track new songs. The user does not know what an activity and service is; he or she knows that this series of screens allows him or her to control and play songs.
Actions in the task should not belong to the same "application" from the point of view of development. If the task of the music player allows users to associate an image with a song, it can trigger image gallery activity or camera activity. Since the new activity is still working with the goal of managing songs, it is still part of the same task.
On the other hand, if the user completely violates the target, it may be time to start another task. For example, if you launch a web browser to view the artistβs website, the user is now doing something else. The user probably does not associate the web browser with managing and playing songs, so this will probably be a different task.
source share