I\'m learning the Basics of Android programming.
I have a simple android test application in which i log the accelerometer,magnetometer and the orientation data to a
When registering your Listener with the SensorManager using registerListener, instead of the fixed constants SENSOR_DELAY_... you can pass the interval in microseconds as described in the JavaDocs:
rate The rate sensor events are delivered at. This is only a hint to the system. Events may be received faster or slower than the specified rate. Usually events are received faster. The value must be one of SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST or, the desired delay between events in microsecond.
So, just pass 40000 to match your example request, also, as stated, this in only a hint so I would not rely on getting the values in intervals exact to the microseconds.