FenceExitedEvent

@JsonClass(generateAdapter = true)
data class FenceExitedEvent(    val fenceId: UUID,     val fenceName: String,     val distance: Double,     val distanceRequired: Double,     val dwellTime: Long,     val locations: List<LocationDetails>,     val applicationState: AppState,     val eventTime: Instant = Instant.now(),     val localEventTime: String = eventTime.toLocalEventTimeString()) : TriggerEvent, FenceExited

A FenceExited event is triggered when the device leaves a zone and an Exit trigger is registered in Canvas.

Example:

FenceExitedEvent(fenceId=92db47aa-0e42-4bd6-97c0-e309a6cc6ab3,
fenceName=Fence 0,
distance=59.337412105960226,
distanceRequired=58.119998931884766,
dwellTime=96097,
locations=[RealLocationDetails(longitude=145.2979188,
latitude=-38.0580995, horizontalAccuracy=14.53,
time=2023-11-15T01:10:39.464Z, altitude=40.70000076293945,
verticalAccuracy=20.997742, bearing=38.38074, speed=1.1501204)],
applicationState=AppState(locationPermission=ALWAYS,
batteryLevel=42, lastRuleUpdate=2023-11-15T00:48:09.350Z,
viewState=FOREGROUND_SERVICE, foregroundServiceEnabled=true),
eventTime=2023-11-15T01:10:39.510Z,
localEventTime=2023-11-15T12:10:39.510)]

Constructors

Link copied to clipboard
fun FenceExitedEvent(    fenceId: UUID,     fenceName: String,     distance: Double,     distanceRequired: Double,     dwellTime: Long,     locations: List<LocationDetails>,     applicationState: AppState,     eventTime: Instant = Instant.now(),     localEventTime: String = eventTime.toLocalEventTimeString())

Properties

Link copied to clipboard
open override val applicationState: AppState

Application-related detail.

Link copied to clipboard
open override val distance: Double

Distance from the last Location causing the exit event to the Zone, in meters.

Link copied to clipboard
open override val distanceRequired: Double

Distance required from the zone to trigger an exit event, in meters.

Link copied to clipboard
open override val dwellTime: Long

Dwell time from entry to exit, in milliseconds.

Link copied to clipboard
open override val eventTime: Instant

Date Time when the trigger event happened.

Link copied to clipboard
open override val fenceId: UUID

Unique Id of the last crossed fence leading up to the trigger event.

Link copied to clipboard
open override val fenceName: String

Name of the last crossed fence leading up to the trigger event.

Link copied to clipboard
open override val localEventTime: String
Link copied to clipboard
val locations: List<LocationDetails>

The Location Update(s) leading to the event.

Inherited properties

Link copied to clipboard
open val eventType: TriggerEvent.Type

Functions

Link copied to clipboard
fun toJson(): String

Convert this object to JSON.

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)