Android - Tasks
Objective #1: What is a task?
- A taskis the sequence of activities the user follows to accomplish an objective, regardless of which applications the activities belong to.
- Every activity started is considered to be part of the current task until a new task is created or is interrupted.
- These activities can all be from one application or they can be from a variety of application.
- An activity started from the application launcher that initiates a new task is called a root activity.
- By pressing the back key, the last activity in that task is resumed.
- An example of a task is sending a text message and attaching a picture or video to it.
Objective #2: How do you interrupt a task?
- A crucial property of a task is the ability to interrupt it. Interrupting a task is very useful to go in between different tasks while keeping one running.
- Interrupting a task is when a user pauses a current task to use another task that, after the task is used, the user can return to the original task.
- An example of interrupting a task is browsing the internet and receiving a phone call. Android pauses the browsing task so the user can attend their phone call. Once the call is over, the browsing task resumes.
- There are two different forms of interrupting a task, in both cases the user should be able to resume where they left off:
- The task is interrupted by a notification that the user acts upon.
- The user interrupts the task by pressing the Home button and performs another task.
- However, this is another way to interrupt a task. This way is through initiating a new activity that in turn starts a new task. The Back button will not resume the previous task because the activity was not initiated through the Home screen.
Objective #3: Understand the consequences of running more than one task.
- Multitasking eats up the battery life of a phone because there are tasks running behind the scenes, even if it isn’t the current task.
- To kill a task, you need to access the settings of the phone and kill it through the task manager.
- Some tasks can be killed by going through the options of the application and some are killed when the Home button is pressed.
- Some tasks are still running and there are no notifications of its existence.