Current location

This section describes how to use and be updated of the current location of the Veery class (IOS & Android native)

current overview rn

Depending on how Veery was activated, Veery collects the geolocations and store them into the Cache.

Veery activate mode Application status Battery/Energy status Geolocation Historization
Veery.DEACTIVATE_ALL any any off off
Veery.FOREGROUND In foreground any Every 5 meters local Cache only
Veery.FOREGROUND In background any off off
Veery.BACKGROUND In foreground any Every 5 meters local Cache only
Veery.BACKGROUND In background Charging/Plugged Every 5 meters local Cache only
Veery.BACKGROUND In background Consuming/Unplugged Every 100-500 meters or 10 minutes local Cache only
Veery.BACKEND In foreground any Every 5 meters local Cache and Veery backend (to Sandpiper API and Tern Cloud DB)
Veery.BACKEND In background Charging/Plugged Every 5 meters local Cache and Veery backend
Veery.BACKEND In background Consuming/Unplugged Every 100-500 meters or 10 minutes local Cache and Veery backend

For current location, Veery.GEOPROFILE act as Veery.BACKEND does.

Background precision may depend on the quality of the network in the area.

Veery Function

getCurrentLocation()

Get the last known location of the user.

getCurrentLocationAge()

Available only for Android Platform

Get age (in seconds) of the last known location.

requestLocationUpdate()

Start receiving events (callback) when the location has changed.

stopLocationUpdate()

Stop receiving events (callback) requested by requestLocationUpdate.

DeviceEventEmitter

veeryLocationUpdate

Callback triggered every time a new geolocation is known.