View detection

Instana provides a user journey analysis process for mobile application developers to understand how the user interacts with the app. This feature helps to automatically detect the lifecycle of the fragments and activities of an Android app and view controllers of an iOS app.

Supported technologies

The Android and iOS native applications support Instana view detection in the following agent versions:

  • Instana Android agent 6.0.15 or later (Based on Gradle 7.3.3)
  • Instana iOS agent 1.7.0 or later

Enabling view detection in the Android agent

To enable view detection in the Instana Android agent, complete the following steps:

  1. You must ensure that the Instana Android agent plug-in and SDK are integrated in your Android application. For more information, see Android agent instructions.

  2. Set the autoCaptureScreenNames property to true when you call the Instana.setup() method. See the following example:

    class ExampleApp : Application() {
        override fun onCreate() {
            super.onCreate()
            val instanaConfig = InstanaConfig(
                key = "xxxxxx",
                reportingURL = "https://instana.example.com/mobile",
                autoCaptureScreenNames = true
            )
            Instana.setup(this, instanaConfig)
        }
    }
    

Enabling view detection in the iOS agent

To enable view detection in the Instana iOS agent, complete the following steps:

  1. You must ensure that the Instana iOS agent is installed in your iOS application. For more information, see the iOS agent instructions.

  2. Set the autoCaptureScreenNames property to true when you call the Instana.setup() method. See the following example:

    import UIKit
    import InstanaAgent
    
    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {
    
        var window: UIWindow?
    
        func application(_ application: UIApplication,
                    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
            let options = InstanaSetupOptions(autoCaptureScreenNames: true)
            Instana.setup(
                key: "xxxxxx",
                reportingURL: URL(string: "https://instana.example.com/mobile")!,
                options: options
            )
            return true
        }
    }
    

Screen rendering duration

Screen rendering duration measures the time each screen takes to become fully interactive after loading. When view detection tracking is enabled, this duration is automatically captured. Monitoring this performance helps mobile developers identify time-consuming screens and optimize rendering performance, which enhances user experience.

Screen rendering duration navigation flow

The Top Views widget displays the rendering duration of each view with its occurrence count. The Views tab also displays rendering durations of each view that leads to the internal summary page for deeper insights.

Screen rendering duration KPI card

The Rendering Duration KPI card on the Views Summary tab displays the rendering duration that represents the 75th percentile of the rendering durations for that view to become interactive. This metric indicates that 75% of rendering durations are less than that value within the selected time frame.

The 75th percentile (also known as the third quartile) is robust to outliers and provides a realistic trend experienced by the majority of users. Slower rendering views degrade application performance, and the KPI card helps developers identify slower rendering durations, identify bottlenecks, and analyze root causes to optimize user experience.

Screen rendering duration chart

The "Rendering Duration" chart on the Views Summary tab shows the rendering duration, which represents the 75th percentile of rendering durations for each view.

  • X-axis: Beacon timestamps (time series)
  • Y-axis: 75th percentile of rendering durations during the selected period

Analyzing views in the Instana UI

After you enable auto view detection for an application, you can analyze the view data.

To analyze views in the Instana UI, complete the following steps:

  1. Click Analytics in the Instana UI.

  2. In the Analytics page, click Mobile Apps > View Transitions.

  3. Filter your application as follows:

    Figure 1. Mobile App view transition analytics view
    Screenshot showing the mobile App view transition analytics view

    To see the view details, expand the View section, and then you can see the properties to describe the view. See the following screenshot:

    Figure 2. Properties of a view
    Screenshot showing the properties of a view

A view has the following information in an Android app:

  1. Activity Name: The screen name of an activity.
  2. Activity Class Name: The simple class name of an activity.
  3. Activity Local Path: The class name of an activity with local path.
  4. Activity Resume Time: The time that is required by an activity to start interacting with a user.
  5. Fragment Name: The screen name of a fragment.
  6. Fragment Class Name: The simple class name of a fragment.
  7. Fragment Local Path: The class name of a fragment with local path.
  8. Fragment Resume Time: The time that is required by a fragment to start interacting with a user.
  9. Active Fragment List: A list of active fragments in the current view.

A view has the following information in an iOS app:

  1. Accessibility Label: A succinct label in a localized string that identifies the accessibility element.
  2. Navigation Item Title: The title of the navigation item that is displayed in the navigation bar.
  3. Class Name: The name of the view controller class.