HeartbeatEvent¶
classHeartbeatEvent
Periodic heartbeat delivered to BGGeo.onHeartbeat.
The SDK fires this event on a fixed interval while running in the background, providing a regular opportunity to perform work even when no location events are occurring. Configure the interval with AppConfig.heartbeatInterval.
val bgGeo = BGGeo.instance
bgGeo.onHeartbeat { event ->
Log.d(TAG, "[onHeartbeat] ${event.location}")
}
Members¶
location¶
val location:LocationEvent?
Most recent location recorded by the SDK.
The heartbeat event does not actively request a fresh location fix. Call BGGeo.getCurrentPosition if an up-to-date reading is required.