Android sensor update rate -
i have been working on android sensors , can't confirm when onsensorchanged(sensorevent e) fires.
1)i started sensorlistener
2)i assumed onsensorchanged fired when sensor changed previous value (stored where???)
3)i ended listener (after 60 seconds)
i repeated same steps 5 minutes later no phone changes , few different values , whole bunch of zeroes.
can point somewhere in documentation answers question?
onsensorchanged called if new sensor values can taken. can set frequency of getting sensor values:
android.hardware.sensormanager.registerlistener(sensorlistener listener, int sensors, int rate)
int sensor_delay_fastest sensor data fast possible
int sensor_delay_game rate suitable games
int sensor_delay_normal rate (default) suitable screen orientation changes
int sensor_delay_ui rate suitable user interface
Comments
Post a Comment