Tag

Activity

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.

ActivityFLAG_ACTIVITY_NEW_TASKIntent
0 likes · 23 min read
Exploring FLAG_ACTIVITY_NEW_TASK and Activity Stack Validation in Android
Sohu Tech Products
Sohu Tech Products
Apr 6, 2023 · Mobile Development

Deep Dive into Android Activity Launch Process and Framework Implementation

This article provides an in‑depth analysis of Android’s Activity launch mechanism, tracing the client‑side startActivity call through the framework layers, system_server services, AIDL interfaces, transaction handling, and the execution of lifecycle callbacks such as onCreate, onStart, and onResume, with extensive code excerpts.

AIDLActivityLifecycle
0 likes · 31 min read
Deep Dive into Android Activity Launch Process and Framework Implementation
Sohu Tech Products
Sohu Tech Products
Feb 1, 2023 · Mobile Development

Semi‑Automatic Declarative Show Exposure Tracking for Android Activities and Fragments

This article explains the differences between PV and show exposure points, introduces a PvTracker interface for semi‑automatic page‑view reporting, and presents a comprehensive solution that uses global activity lifecycle callbacks, fragment visibility detection, and Kotlin extension methods to achieve fully automated show event reporting in Android applications.

ActivityFragmentKotlin
0 likes · 12 min read
Semi‑Automatic Declarative Show Exposure Tracking for Android Activities and Fragments
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.

ActivityFLAG_ACTIVITY_NEW_TASKLaunchMode
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
Nov 10, 2021 · Mobile Development

Android Routing Management: Activity, Fragment, and Hybrid Page Navigation

Android routing management separates native navigation—using Activity launch modes, the ActivityManagerService task stack, intents, and the Navigation component for fragments—from hybrid navigation, where Activities host WebView, Weex/React‑Native, or Flutter pages and communicate via intents, bridges, or platform channels to achieve flexible page routing.

ActivityFragmentHybrid
0 likes · 13 min read
Android Routing Management: Activity, Fragment, and Hybrid Page Navigation
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Dec 9, 2020 · Mobile Development

Seamless Video Playback Across Activities in NetEase Cloud Music: MediaPlayer Rebinding and Mini‑Window Solutions

NetEase Cloud Music’s 8.0 redesign enables seamless video playback across Activities by rebinding MediaPlayer instances to new TextureViews via AIDL, using a process‑pooled player architecture, while also offering simpler alternatives such as animated fake page switches, seek‑based reinitialization, and application‑context view reuse.

AIDLActivityMediaPlayer
0 likes · 13 min read
Seamless Video Playback Across Activities in NetEase Cloud Music: MediaPlayer Rebinding and Mini‑Window Solutions
Didi Tech
Didi Tech
Jul 5, 2019 · Mobile Development

Understanding and Optimizing Android Activity Startup Performance

Android activity startup latency stems from three phases—Pause, Launch, and Render—so optimizing only onCreate often leaves perceived delays; developers can measure each phase via system logs or AOP hooks (Instrumentation, Looper‑Printer, or ActivityThread handler) to pinpoint and reduce bottlenecks.

ActivityHookInstrumentation
0 likes · 21 min read
Understanding and Optimizing Android Activity Startup Performance
360 Quality & Efficiency
360 Quality & Efficiency
May 3, 2018 · Mobile Development

How to Retrieve Android App Package Name and Activity for Automation Testing

This article explains several practical methods—including ADB commands, UIAutomatorViewer, source inspection, Appium, and AAPT—to obtain an Android application's package name and launch Activity, which are essential for configuring automation tools such as Appium.

ADBActivityAutomation Testing
0 likes · 4 min read
How to Retrieve Android App Package Name and Activity for Automation Testing
Tencent Cloud Developer
Tencent Cloud Developer
Mar 6, 2017 · Game Development

Understanding Unity Scene and Android Activity Integration and Custom Unity Android Plugins

The article explains that each Unity scene runs inside an Android Activity by embedding a UnityPlayer FrameLayout, details how UnityPlayerActivity and GoogleUnityActivity load scenes, shows how to subclass these activities for custom integration, and outlines essential steps for creating reliable Unity‑Android plugins and handling assets.

ActivityPluginScene
0 likes · 15 min read
Understanding Unity Scene and Android Activity Integration and Custom Unity Android Plugins
360 Quality & Efficiency
360 Quality & Efficiency
Aug 25, 2016 · Mobile Development

Understanding Android Activity: Functions, Lifecycle, and Process States

This article explains the core role of Android Activity, how it interacts with users, obtains context, saves state, handles configuration changes, switches with services, details its lifecycle stages, and describes the related process priority levels in the Android system.

ActivityLifecycleMobile Development
0 likes · 6 min read
Understanding Android Activity: Functions, Lifecycle, and Process States
360 Quality & Efficiency
360 Quality & Efficiency
Aug 10, 2016 · Mobile Development

Understanding Android Activity: Role, Lifecycle, Process States, and Additional Considerations

This article explains the fundamental role of Android Activity as the primary UI component, its interaction with layouts and context, how it saves state, handles configuration changes, switches with services, and details its complete, visible, and foreground lifecycles as well as the various process priority levels in Android.

ActivityLifecycleMobile Development
0 likes · 7 min read
Understanding Android Activity: Role, Lifecycle, Process States, and Additional Considerations
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