Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

An Android library which provides a legend for the sensor values by providing the sensor type.

License

Notifications You must be signed in to change notification settings

michaeltroger/sensorvaluelegend

Repository files navigation

Sensor Value Legend

A simple Android library which provides a legend for the sensor values by providing the sensor type. The legends returned are based on the official Android Developers Reference.

Usage

String[] shortDescriptions = SensorValueLegend.getDescriptionsShort(Sensor.TYPE_ACCELEROMETER);
// shortDescriptions contains -> [0] = "accX", [1] = "accY", [2] = "accZ"

String[] fullDescriptions = SensorValueLegend.getDescriptionsFull(Sensor.TYPE_ACCELEROMETER);
// fullDescriptions contains -> [0] = "Acceleration including gravity on x-axis", [1] = "Acceleration including gravity on y-axis", [2] = "Acceleration including gravity on z-axis"

String[] units = SensorValueLegend.getUnits(Sensor.TYPE_ACCELEROMETER);
// units contains -> [0] = "m/s²", [1] = "m/s²", [2] = "m/s²"

Setting up

In your module's build.gradle reference the library:

dependencies {
  // ...
  compile 'com.michaeltroger.sensorvaluelegend:sensorvaluelegend:1.0.3'
}

That's all!

About

An Android library which provides a legend for the sensor values by providing the sensor type.

Topics

Resources

License

Stars

Watchers

Forks

Languages