Package 

Interface AppStartupActivityPredicate


  • 
    public interface AppStartupActivityPredicate
    
                        

    Predicate to determine which Activities should be considered for app startup Time To Initial Display (TTID) reporting.

    During application launch the SDK tracks the first Activity that is created and uses the time it draws its first frame to compute the TTID value. Use this if you want to skip some Activities and instead make the SDK consider the 2nd, 3rd Activity's first frame. Example use cases are:

    • Splash screens implemented as Activity.

    • Activities that launch another Activity in their onCreate() method and call finish() on themselves.

    Performance Note: This predicate is called for every Activity during app startup. Ensure the implementation is lightweight and doesn't perform expensive operations (e.g., disk I/O, network calls, heavy computations).

    Example usage:

    RumConfiguration.Builder(applicationId)
        .setAppStartupActivityPredicate { activity ->
            // Exclude authentication and splash activities from TTID measurement
            activity !is AuthenticationActivity && activity !is SplashActivity
        }
        .build()
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean shouldTrackStartup(Activity activity) Determines whether the given Activity should be considered for TTID measurement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • shouldTrackStartup

         abstract Boolean shouldTrackStartup(Activity activity)

        Determines whether the given Activity should be considered for TTID measurement.

        This method is called on the main thread during Activity creation. Keep the implementation fast and avoid blocking operations.

        Parameters:
        activity - The Activity being evaluated during app startup.