Tag

LaunchMode

0 views collected around this technical thread.

vivo Internet Technology
vivo Internet Technology
Apr 12, 2023 · Mobile Development

Exploring FLAG_ACTIVITY_NEW_TASK and Activity Stack Validation in Android

The article investigates a real‑world Android navigation bug by dissecting how FLAG_ACTIVITY_NEW_TASK interacts with launch modes, task affinities and intent construction, revealing that the flag does not always behave like singleTask, that START_DELIVERED_TO_TOP may fail to deliver new intents, and offering debugging steps and practical fixes.

ActivityAndroidFLAG_ACTIVITY_NEW_TASK
0 likes · 23 min read
Exploring FLAG_ACTIVITY_NEW_TASK and Activity Stack Validation in Android
Sohu Tech Products
Sohu Tech Products
Dec 22, 2021 · Mobile Development

In-depth Source Code Investigation of FLAG_ACTIVITY_NEW_TASK Causing Activity Launch Failure

This article analyzes why adding the FLAG_ACTIVITY_NEW_TASK flag can prevent an Android Activity from starting, examines the underlying framework source code—including startActivityInner, getReusableTask, recycleTask, and complyActivityFlags—and provides practical solutions to resolve the launch failure.

ActivityAndroidFLAG_ACTIVITY_NEW_TASK
0 likes · 18 min read
In-depth Source Code Investigation of FLAG_ACTIVITY_NEW_TASK Causing Activity Launch Failure
Tencent Music Tech Team
Tencent Music Tech Team
Jun 2, 2016 · Mobile Development

Ensuring a Single Instance of the Main Activity in Android Using a Dispatcher Activity

To guarantee a single persistent main Activity while allowing sub‑Activities and third‑party navigation, the article proposes routing all external and internal launches through a dedicated DispatcherActivity that uses FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP, a static weak reference, and onNewIntent handling, avoiding singleTask/instance modes.

ActivityAndroidDispatcher
0 likes · 14 min read
Ensuring a Single Instance of the Main Activity in Android Using a Dispatcher Activity