android - Is possible get sensor value directly? -


is possible sensor value directly?

i've read android developer page's introduction , search relative information on internet seems register listener way sensor value?

but kind of solution can not meet project requirement need first set of data value sensor didn't detect value change use listener, can't value while no value changed...

but seems register listener way sensor value?

correct. welcome register listener, unregister after first value, if like. however, bear in mind sensors tend "noisy", , may better served getting number of sensor readings, averaging them or otherwise smoothing data.


Comments