tezvyn:

Describe the back stack for A -> B -> C with singleTask

Source: developer.android.comintermediate

Tests understanding of the `singleTask` launch mode. A great answer explains that launching C destroys B, as `singleTask` clears all activities above it in the task. The final back stack becomes [A, C]. A red flag is confusing this with `singleTop`.

This tests your understanding of Android's `singleTask` launch mode and its 'clear top' behavior on the back stack. A great answer states that Activity B is destroyed, then explains that when `singleTask` Activity C is launched, the system clears any activities above it (in this case, B). The final back stack is [A, C]. A major red flag is confusing `singleTask` with `singleTop` (which would result in [A, B, C]) or `singleInstance` (which creates a new task).

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Describe the back stack for A -> B -> C with singleTask · Tezvyn