Search code examples
androidsensors

How to get Android sensor sampling frequency?


For android device, I only know that we can define the parameters for SensorManager in order to adjust the sample rate of the sensor. However is there a way to measure the sensor sampling rate accurately?


Solution

  • GPS works at 1 Hz and you cannot change that. If you ask about the internal sampling rate, you have to check what GPS chip is in your device and look at its specs.

    The other sensors you can measure by taking timestamps. But i have seen devices range from 10 ms per acceleration call to 30 and more (on the fastest rate).