PlatformAnalytics

Interface to abstract platform-specific functionalities, primarily for analytics and related services that differ between product flavors.

Properties

Link copied to clipboard

Indicates whether platform-specific services (like Google Play Services or Datadog) are available and initialized.

Functions

Link copied to clipboard
abstract fun setDeviceAttributes(firmwareVersion: String, model: String)

Sets device-specific attributes (e.g., firmware version, hardware model) for analytics.

Link copied to clipboard
open fun startScreenView(key: String, name: String)

Starts tracking a screen as a RUM view, aligned with the Meshtastic-Apple Datadog integration (which auto-tracks SwiftUI views) so per-screen RUM data lines up across platforms.

Link copied to clipboard
open fun stopScreenView(key: String)

Stops the RUM view previously started with startScreenView for the given key.

Link copied to clipboard
abstract fun track(event: String, vararg properties: DataPair)
Link copied to clipboard
open fun trackAction(name: String, attributes: Map<String, Any> = emptyMap())

Tracks a key user interaction as a named custom RUM action. Auto-tracked tap targets are R8-obfuscated in release builds, so analytically important interactions must be reported explicitly with a stable name.

Link copied to clipboard
open fun trackConnect(firmwareVersion: String?, transportType: String?, hardwareModel: String?, nodes: Int, connectionRestored: Boolean)

Tracks a successful device connection as a custom RUM action, aligned with the Meshtastic-Apple DataDog integration for cross-platform analytics comparison.