Current location

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

Veery Architecture Android

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 Functions

getCurrentLocation()

Get the last known location of the user.

getCurrentLocationAge()

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

requestLocationUpdate(LocationUpdate callback)

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

stopLocationUpdate()

Stop receiving events (callback) requested by requestLocationUpdate.

Veery Sub-classes

none

Veery Interfaces

LocationUpdate

Location update interface could be passed as parameter to the requestLocationUpdate function

onLocationUpdate(Location loc, long age)

Callback triggered every time a new geolocation is known.