View detection (public preview)

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
        }
    }
    

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:

    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:

    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.