tezvyn:

Describe the back stack for A to B to C with singleTask

Source: developer.android.comintermediate

Tests singleTask plus taskAffinity, not rote memorization. With default affinity, C sits atop B in the same task; if C already existed, the system clears B and delivers onNewIntent. Red flag: claiming singleTask always spawns a new task.

Tests deep knowledge of Activity launch modes and the taskAffinity nuance that singleTask does not automatically create a new task. A strong answer covers four things in order: first, with default affinity C is placed in the existing task above B; second, if an instance of C were already present, the system would pop B and any activities above it, then deliver onNewIntent; third, a different taskAffinity would spawn a new task with C at the root; fourth, only one C instance can exist.

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 to B to C with singleTask · Tezvyn