Sensor Service

Use the Sensor Service to connect to the motion sensors of an operating system. The service currently supports accelerometer, gravity, and gyroscope sensors. You can enable and disable the sensors and read their current state.

The accelerometer and gravity sensors are connected. Enabling either one enables both sensors. This way you can subtract the gravity component from the accelerometer, making the data more usable in the UI.

Runtime data

  • Accelerometer. Enabled, X, Y, and Z values.

  • Gravity. Enabled, X, Y, and Z values.

  • Gyroscope. Enabled, X, Y, and Z values.

Interface definition

The interface definition XML file for the Sensor Service is <KanziConnectInstallation>/SDK/interfaces/definitions/sensor_interface.xml.

Fully qualified name for the Sensor Service is Connect.Service.Sensor.

Supported platforms

This service is supported on Android by using the Android SensorManager (android.hardware.SensorManager).