-
Notifications
You must be signed in to change notification settings - Fork 61
NavigationViewTrackingStrategy
class NavigationViewTrackingStrategy(@IdResnavigationViewId: Int, trackArguments: Boolean, componentPredicate: ComponentPredicate<NavDestination> = AcceptAllNavDestinations()) : ActivityLifecycleTrackingStrategy, ViewTrackingStrategy, NavController.OnDestinationChangedListener
A ViewTrackingStrategy that will track Fragments within a NavigationHost as RUM Views.
navigationViewId | the id of the NavHost view within the hosting Activity. |
trackArguments | whether to track navigation arguments |
componentPredicate | the predicate to keep/discard/rename the tracked NavDestinations |
constructor(@IdResnavigationViewId: Int, trackArguments: Boolean, componentPredicate: ComponentPredicate<NavDestination> = AcceptAllNavDestinations())
navigationViewId | the id of the NavHost view within the hosting Activity. |
trackArguments | whether to track navigation arguments |
componentPredicate | the predicate to keep/discard/rename the tracked NavDestinations |
open override fun onActivityPaused(activity: Activity)
open override fun onActivityStarted(activity: Activity)
open override fun onActivityStopped(activity: Activity)
open override fun onDestinationChanged(controller: NavController, destination: NavDestination, arguments: Bundle?)
fun startTracking()
Starts tracking on current activity.
This is automatically called when activity starts. If using static navigation setup, with navigation container in XML layout, there's no need to call it manually. However if using dynamic navigation setup where navigation controller is created programmatically, then this function must be called after navigation controller is injected into view hierarchy. Regardless of the usage, the function always relies on view ID provided with the constructor.
If activity is stopped, the function will return immediately without starting tracking.
fun stopTracking()
Stops tracking current activity.
This is automatically called when activity stops. If using static navigation setup, with navigation container in XML layout, there's no need to call it manually. Even with dynamic navigation setup where navigation controller is created programmatically, default behavior should be enough. But the function is here in case tracking needs to be managed outside of the default activity lifecycle. In this case note that it's possible to call startTracking and stopTracking multiple times in succession.
If activity is stopped, the function will return immediately.
- Datadog
- DatadogSite
- _InternalProxy
- InternalLogger
- SdkCore
- DatadogContext
- DeviceInfo
- DeviceType
- NetworkInfo
- ProcessInfo
- TimeInfo
- UserInfo
- Feature
- FeatureContextUpdateReceiver
- FeatureEventReceiver
- FeatureScope
- FeatureSdkCore
- StorageBackedFeature
- Request
- RequestFactory
- DataWriter
- EventBatchWriter
- EventType
- FeatureStorageConfiguration
- RawBatchEvent
- DataStoreHandler
- DataStoreReadCallback
- DataStoreWriteCallback
- InternalSdkCore
- SdkReference
- BackPressureMitigation
- BackPressureStrategy
- BatchProcessingLevel
- BatchSize
- Configuration
- HostsSanitizer
- UploadFrequency
- UploadSchedulerStrategy
- DataConstraints
- DatadogDataConstraints
- ThreadDump
- DefaultFirstPartyHostHeaderTypeResolver
- FirstPartyHostHeaderTypeResolver
- Deserializer
- BuildSdkVersionProvider
- JsonSerializer
- MethodCallSamplingRate
- PerformanceMetric
- TelemetryMetricType
- PersistenceStrategy
- Serializer
- DataStoreContent
- RateBasedSampler
- Sampler
- FlushableExecutorService
- EventMapper
- MapperSerializer
- NoOpEventMapper
- LogAttributes
- TrackingConsent
- TrackingConsentProviderCallback
- Encryption
- TracingHeaderType
- DdRumContentProvider
- GlobalRumMonitor
- Rum
- RumActionType
- RumAttributes
- RumConfiguration
- RumErrorSource
- RumMonitor
- RumPerformanceMetric
- RumResourceAttributesProvider
- RumResourceKind
- RumResourceMethod
- RumSessionListener
- _RumInternalProxy
- VitalsUpdateFrequency
- ViewEventMapper
- ResourceTiming
- AdvancedNetworkRumMonitor
- ResourceId
- RumResourceInputStream
- AcceptAllActivities
- AcceptAllDefaultFragment
- AcceptAllNavDestinations
- AcceptAllSupportFragments
- ActivityLifecycleTrackingStrategy
- ActivityViewTrackingStrategy
- ComponentPredicate
- FragmentViewTrackingStrategy
- InteractionPredicate
- MixedViewTrackingStrategy
- NavigationViewTrackingStrategy
- TrackingStrategy
- ViewAttributesProvider
- ViewTrackingStrategy
- DatadogDatabaseErrorHandler
- ActionEvent
- ErrorEvent
- LongTaskEvent
- ResourceEvent
- ViewEvent
- TelemetryConfigurationEvent
- TelemetryDebugEvent
- TelemetryErrorEvent
- ExtensionSupport
- ImagePrivacy
- MapperTypeWrapper
- SessionReplay
- SessionReplayConfiguration
- SessionReplayPrivacy
- MappingContext
- OptionSelectorDetector
- SystemInformation
- BaseAsyncBackgroundWireframeMapper
- BaseViewGroupMapper
- BaseWireframeMapper
- EditTextMapper
- TextViewMapper
- TraverseAllChildrenMapper
- WireframeMapper
- AndroidMDrawableToColorMapper
- AndroidQDrawableToColorMapper
- AsyncJobStatusCallback
- ColorStringFormatter
- DefaultColorStringFormatter
- DefaultViewBoundsResolver
- DefaultViewIdentifierResolver
- DrawableToColorMapper
- GlobalBounds
- ImageWireframeHelper
- LegacyDrawableToColorMapper
- ViewBoundsResolver
- ViewIdentifierResolver
- MobileSegment
- ResourceHashesEntry
- ResourceMetadata