Skip to content

Sensors

classSensors

Availability of motion sensors on the device, as returned by BGGeo.getSensors.

These sensors power the SDK's motion activity-recognition system. When a sensor is absent — particularly on low-end Android devices — motion recognition performance degrades and the SDK may rely more heavily on location-based heuristics.

// Within a coroutine scope
val bgGeo = BGGeo.instance

val sensors = bgGeo.sensors
Log.d(TAG, "[Sensors] $sensors")

Members

hasAccelerometer

val hasAccelerometer: Boolean

true when the device has an accelerometer.

hasGyroscope

val hasGyroscope: Boolean

true when the device has a gyroscope.

hasMagnetometer

val hasMagnetometer: Boolean

true when the device has a magnetometer (compass).

hasSignificantMotion

val hasSignificantMotion: Boolean

Android only true when the device supports the Significant Motion hardware trigger.

When present, this sensor allows the SDK to wake from a deep idle state only when the device actually moves, saving significant battery.