Added in API level 31

Event

public abstract class Event
extends Object

java.lang.Object
   ↳ android.media.metrics.Event


Abstract class for metrics events.

Summary

Public methods

Bundle getMetricsBundle()

Gets metrics-related information that is not supported by dedicated methods.

long getTimeSinceCreatedMillis()

Gets time since the corresponding log session is created in millisecond.

Inherited methods

Public methods

getMetricsBundle

Added in API level 31
public Bundle getMetricsBundle ()

Gets metrics-related information that is not supported by dedicated methods.

It is intended to be used for backwards compatibility by the metrics infrastructure.

Returns
Bundle This value cannot be null.

getTimeSinceCreatedMillis

Added in API level 31
public long getTimeSinceCreatedMillis ()

Gets time since the corresponding log session is created in millisecond.

Returns
long the timestamp since the instance is created, or -1 if unknown. Value is -1 or greater