i can suggest to start from the examples found in the AOSP-supported device, e.g.
$ cd device/moto/stingray/sensors $ ls -l total 84 -rw-r--r-- 1 ffxx68 ffxx68 4795 2012-12-21 19:45 AccelerationSensor.cpp -rw-r--r-- 1 ffxx68 ffxx68 1595 2012-12-21 19:45 AccelerationSensor.h -rw-r--r-- 1 ffxx68 ffxx68 7889 2012-12-21 19:45 AkmSensor.cpp -rw-r--r-- 1 ffxx68 ffxx68 1709 2012-12-21 19:45 AkmSensor.h -rw-r--r-- 1 ffxx68 ffxx68 1262 2012-12-21 19:45 Android.mk -rw-r--r-- 1 ffxx68 ffxx68 3617 2012-12-21 19:45 GyroSensor.cpp -rw-r--r-- 1 ffxx68 ffxx68 1524 2012-12-21 19:45 GyroSensor.h -rw-r--r-- 1 ffxx68 ffxx68 2313 2012-12-21 19:45 InputEventReader.cpp -rw-r--r-- 1 ffxx68 ffxx68 1393 2012-12-21 19:45 InputEventReader.h -rw-r--r-- 1 ffxx68 ffxx68 3218 2012-12-21 19:45 LightSensor.cpp -rw-r--r-- 1 ffxx68 ffxx68 1499 2012-12-21 19:45 LightSensor.h -rw-r--r-- 1 ffxx68 ffxx68 7610 2012-12-21 19:45 nusensors.cpp -rw-r--r-- 1 ffxx68 ffxx68 3940 2012-12-21 19:45 nusensors.h -rw-r--r-- 1 ffxx68 ffxx68 3602 2012-12-21 19:45 PressureSensor.cpp -rw-r--r-- 1 ffxx68 ffxx68 1539 2012-12-21 19:45 PressureSensor.h -rw-r--r-- 1 ffxx68 ffxx68 3044 2012-12-21 19:45 SensorBase.cpp -rw-r--r-- 1 ffxx68 ffxx68 1773 2012-12-21 19:45 SensorBase.h -rw-r--r-- 1 ffxx68 ffxx68 2991 2012-12-21 19:45 sensors.c Adding code for a new one, removing, or modifying existing ones, should be relatively easy. They all follow a similar API scheme. Take care of correct scale ranges of your new sensor chipset, in nusensors.h. Then, add sensors/Android.mk to your device make (follow examples again, about how to). On Tuesday, 16 July 2013 12:35:08 UTC+2, shashi pal wrote: > > hello all, > > Can some one please guide me towards any documentation threads that can > explain how a new sensor support can be added in > android sensor framework? i ll be gratefull to u. > > Regards, > shashi > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.