Documentation
¶
Overview ¶
Stream live sensor events via the SensorManager event queue callback.
Demonstrates the ISensorManager.CreateEventQueue API: registers an IEventQueueCallback stub, enables the accelerometer at 100 ms sampling, and prints incoming sensor events for a fixed duration.
This is the callback-driven counterpart to sensor_reader (which only lists sensor metadata).
Build:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o build/sensor_gateway ./examples/sensor_gateway/ adb push build/sensor_gateway /data/local/tmp/ && adb shell /data/local/tmp/sensor_gateway
Click to show internal directories.
Click to hide internal directories.