title: How to get x, y, z values from Android Accelerometer sensor on a regular frequency, for instance per 20ms, 40 ms or 60 ms
body: <p>Im working on an Android project and met the situation below:</p>
  
  <ol>
  <li><p>Now we are needing the accelerometer value on a regular frequency, such as 20ms, 40ms or 60ms</p></li>
  <li><p>Now we are SENSOR_DELAY_GAME right now but we found different devices are having different intervals for this parameter. For instance, the G2 is using 40ms, G7 is using 60ms and Nexus S is using 20ms.</p></li>
  <li><p>I tried to set timer or used thread.sleep but because of the GC problem of Java, they can not let the system to get the value on a regular frequency.</p></li>
  </ol>
  
  <p>This is very annoying and if any one has any idea to say if inside Android SDK there is a proper method to allow me get the accelerometer values on a regular frequency, that will be very helpful!</p>
  
  <p>Thanks a lot!</p>