FenceEnteredEvent

@JsonClass(generateAdapter = true)
data class FenceEnteredEvent(    val fenceId: UUID,     val fenceName: String,     val locations: List<LocationDetails>,     val crossedFences: List<CrossedFence>,     val applicationState: AppState,     val eventTime: Instant = Instant.now(),     val localEventTime: String = eventTime.toLocalEventTimeString()) : TriggerEvent, FenceEntered

A FenceEntered event is triggered when Zone entry conditions are met and an Entry trigger is registered in Canvas.

Example:

FenceEnteredEvent(fenceId=92db47aa-0e42-4bd6-97c0-e309a6cc6ab3,
fenceName=Fence 0,
locations=[RealLocationDetails(longitude=145.2976349,
latitude=-38.0591382, horizontalAccuracy=18.513,
time=2023-11-15T01:09:03.347Z, altitude=41.400001525878906,
verticalAccuracy=9.572424, bearing=26.452831, speed=1.4476475)],
applicationState=AppState(locationPermission=ALWAYS,
batteryLevel=43, lastRuleUpdate=2023-11-15T00:48:09.350Z,
viewState=FOREGROUND_SERVICE, foregroundServiceEnabled=true),
eventTime=2023-11-15T01:09:03.412Z,
localEventTime=2023-11-15T12:09:03.412),

Constructors

Link copied to clipboard
fun FenceEnteredEvent(    fenceId: UUID,     fenceName: String,     locations: List<LocationDetails>,     crossedFences: List<CrossedFence>,     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
val crossedFences: List<CrossedFence>

List of crossed fences leading to this Fence Entered event.

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. FenceId is autogenerated unique Id assigned to fence when a fence is created at canvas

Link copied to clipboard
open override val fenceName: String

Name of the last crossed fence leading up to the trigger event. FenceName is set while creating a zone at Canvas

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)