---
title: Android Mobile App Launch Monitoring
description: >-
  Measure Android mobile application launch performance, including the time to
  initial display and time to full display.
breadcrumbs: >-
  Docs > RUM & Session Replay > Application Monitoring > Android and Android TV
  Monitoring > Android Mobile App Launch Monitoring
---

# Android Mobile App Launch Monitoring

## Overview{% #overview %}

Application launch monitoring helps you understand how fast your Android app becomes usable after a user taps the app icon. Use it to identify slow startup times, track performance regressions, and optimize the user's first impression of your app.

With this feature, you can:

- Measure time to initial display (TTID) and time to full display (TTFD) for cold and warm starts
- View launch performance trends in the RUM Summary and Mobile Performance Dashboard
- Drill into individual launch events to diagnose bottlenecks

## How it works{% #how-it-works %}

During initialization, the RUM Android SDK creates a view called `ApplicationLaunch`. This view's start time matches the start of the Android process. The `ApplicationLaunch` view includes any logs, actions, and resources created before your first call to `startView`.

{% alert level="danger" %}
The `application_start` action is not collected in Android SDK versions 3.5.0+. The `rum.measure.app.startup_time metric` is marked as deprecated but continues to report data from devices running app versions that use older SDK versions.
{% /alert %}

### Time to initial display and time to full display{% #time-to-initial-display-and-time-to-full-display %}

In Android SDK versions 3.5.0+, the time to initial display (TTID) and time to full display (TTFD) are collected during the application launch period.

| Measurement                                                                                                | Summary                                                          | Details                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Time to initial display](https://developer.android.com/topic/performance/vitals/launch-time#time-initial) | The time it takes to display the first frame of the app's UI.    | The time taken for an app to produce its first frame, including process initialization during a cold start, activity creation during a cold or warm start, and displaying the first frame. |
| [Time to full display](https://developer.android.com/topic/performance/vitals/launch-time#time-full)       | The time it takes for an app to become interactive for the user. | The time taken to display the first frame of the app's UI, as well as the content that loads asynchronously after the initial frame is displayed.                                          |

Each time to initial display and time to full display is categorized by launch type:

- [Cold start](https://developer.android.com/topic/performance/vitals/launch-time#cold): The application is launched from scratch. Cold starts happen when the application is launched for the first time since device boot or since the system terminated the process of the application.
- [Warm start](https://developer.android.com/topic/performance/vitals/launch-time#warm): The application is launched using a subset of the operations that take place during a cold start. Warm starts result from situations such as a user backing out of the application or re-launching the application. Warm starts can also result from the user launching the `Activity` when the OS-process already exists, such as the arrival of a silent push or `WorkManager` job execution.

### Measuring the time to initial display{% #measuring-the-time-to-initial-display %}

The Android SDK automatically measures the TTID. The TTID can be optionally profiled using the Android Mobile Profiler.

### Measuring the time to full display{% #measuring-the-time-to-full-display %}

The time to full display is manually defined using the `GlobalRumMonitor.get().reportAppFullyDisplayed()` API in the Android SDK based on the application's specific definition of "fully drawn."

Below is an example where time to full display is determined when home activity is fully loaded.

{% tab title="Kotlin" %}

```kotlin
class HomeActivity : AppCompatActivity() {

    private val viewModel: HomeViewModel by viewModels()

    override fun onCreate(savedInstanceState: Bundle?) {
        setContentView(R.layout.activity_home)
        super.onCreate(savedInstanceState)

        viewModel.uiState.observe(this) { state ->
            if (state.isLoaded) {
                 GlobalRumMonitor.get().reportAppFullyDisplayed()
            }
        }
    }
}
```

{% /tab %}

If you use `reportFullyDrawn` to identify the moment of full display, you can use [getFullyDrawnReporter](https://developer.android.com/reference/androidx/activity/ComponentActivity#getFullyDrawnReporter%28%29) to subscribe to `reportFullyDrawn` and call `GlobalRumMonitor.get().reportAppFullyDisplayed()`.

{% alert level="danger" %}
If the time to full display is not defined, the Android SDK only collects the TTID.
{% /alert %}

### RUM summary{% #rum-summary %}

The TTID and TTFD are presented in the RUM Summary under Mobile Performance. The standalone Mobile Performance Dashboard also contains distribution visuals for TTID and TTFD.

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/android/android-rum-summary-app-launch.dbbb0f2da42aaa4ac4b2019fce9687dd.png?auto=format"
   alt="Android RUM Summary" /%}

### Vital events{% #vital-events %}

The time to initial display and time to full display are presented as vital events in the RUM session. They are also found under the first view after the `ApplicationLaunch` view. TTID and TTFD are captured if the user launches the application in the session. Neither the TTID nor the TTFD appear if the user does not launch the application during the session.

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/android/android-app-launch-session.e48d508d104271ec303e5840408a7bee.png?auto=format"
   alt="Android session side panel" /%}

The TTID and TTFD can be queried in the RUM Sessions Explorer using the following attributes on the vital event type:

- `@vital.type:app_launch`
- `@vital.name:time_to_initial_display` or `@vital.name:time_to_full_display`

Each TTID and TTFD side panel contains a distribution visualization, an indication of whether the launch was cold or warm, and an event waterfall.

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/android/android-ttid-vital.1dd5e0a45d158fb0456ec14ce352bd6e.png?auto=format"
   alt="Time to initial display vital event" /%}

### Metrics{% #metrics %}

The time to initial display and time to full display are calculated as metrics:

- `rum.measure.app.startup_to_initial_display`, which represents the time to initial display
- `rum.measure.app.startup_to_full_display`, which represents the time to full display

These metrics contain the `@vital.startup_type` attribute to specify the launch type for accurate monitoring.

{% alert level="danger" %}
The `rum.measure.app.startup_to_full_display` metric is not calculated if the time to full display is undefined.
{% /alert %}

## Further reading{% #further-reading %}

- [Source code for dd-sdk-android](https://github.com/DataDog/dd-sdk-android)
- [Explore Datadog RUM](https://docs.datadoghq.com/real_user_monitoring)
