Event

Represents an occurrence of an event that was detected for a user.

Event API

getDurationInSeconds()

@Nullable Long getDurationInSeconds()

Returns the duration of the event, in seconds, if it has ended. Otherwise returns null.

getEndTime()

@Nullable DateTime getEndTime()

Returns the end time of the event, if the event has ended. Otherwise, returns null.

getEventType()

EventType getEventType()

Returns the event type. Based on this type, you can cast an event to the corresponding event class (e.g. TransportEvent, StationaryEvent) to access type specific properties.

getLastUpdateTime()

DateTime getLastUpdateTime()

Returns the last time the event was updated.

getId()

String getId()

Returns the unique identifier of the event.

getStartTime()

DateTime getStartTime()

Returns the start time of the event.

hasEnded()

boolean hasEnded()

Returns true if the event has ended.

isProvisional()

boolean isProvisional()

Indicates whether the event is provisional. A provisional event is identified based on real-time detections, but may change in the near future as more data is collected and processed, to filter out unwanted artifacts. For example, a provisional car transport may get identified, followed by a provisional bus transport. After the full trip is complete, these provisional events may get merged into a single final car event.

Final events are generated independently of the provisional events, and have unique event IDs. They are not linked to the provisional events they may resemble, replace, or overlap with.

Currently, provisional events apply only to 'transport' types, as the SDK tries to determine the mode of transport in (near) real time. When the full trip is complete (e.g. the user becomes stationary), the collected data is reprocessed to produce a more accurate and cleaned up list of transport events.

Last updated