Search code examples
androidcandroid-emulatorkernelandroid-sensors

How to get sensor values for Android


I am currently building 3.1 kernel for android (tegra/goldfish branch). I would like to write a program in C that gets the sensor values. I do have inc/hardware/sensors.h and some relevant files but I keep getting an error when trying to open the sensor device.

Thanks


Solution

  • Take a look at the samples that are packed with the NDK, native-activity in particular.