The SensorDomo Android app provides hooks for providing the phone's sensor data to a web page downloaded from an arbitrary web site.
We plan to add the ability to configure sending the phone’s sensor data out to an external entity via WebSockets.
"SENSOR_TOUCH" - The callback function name you provide will be called with two parameters in the following order:
1) x location of the touch event in pixels
2) y location of the touch event in pixels
"SENSOR_ORIENTATION" - The callback function name you provide will be called with three parameters in the following order:
1) azimuth in degrees
2) pitch in degrees
3) roll in degrees
“SENSOR_ACCELEROMETER” - The callback function name you provide will be called with three parameters in the following order:
1) accelerometer x value
2) accelerometer y value
3) accelerometer z value
“SENSOR_LIGHT” - The callback function name you provide will be called with the following parameter:
1) light value
“SENSOR_PROXIMITY” - The callback function name you provide will be called with the following parameter:
1) proximity value
“SENSOR_GPS” - The callback function name you provide will be called with two parameters in the following order:
If you want to unsubscribe from certain sensor events when you don’t need them anymore, you can save some battery by doing so. The way to unsubscribe is by using the following function call:
Where <sensorName> is one of the sensor names described above.
addOscServer(<ip-address>, <port>, <sensorId>, <oscAddress>);
addOscServer("192.168.1.100", 32323, "SENSOR_TOUCH", "/sensor/touch");