Need to read android sensors really fast

Viewed 8746

Issue:-

  1. I am developing a application which needs a new acceleration datum every 5 millisecond.

My Approach:-

  1. I have created a remote service which only reads the acceleration data from SensorManager.
  2. I had also set the read rate to "DELAY FASTEST" while initialize the SensorManager.
  3. Then i use IPC to communicate too my main application to get these reading.

Problem:-

  1. If i put a log inside onSensorChange() event i receive a new sensor data every 20 ms time. But i need data every 5 ms.

Question ?

  1. Is there any better method to read the senor data faster.

  2. Is there any way i can poll the senor data rather that waiting for the event handler to trigger the event?

Please help me to find a better solution to read the data in 5 ms time or poll the acceleration data.

5 Answers
Related