title: SensorManager: One SensorEventListener VS Multiple Listeners
body: <p>I'm trying to log sensor measurements to the device memory. For this, I register the same SensorEventListener for many sensors, and later separate them using a switch, based on the type. </p>
  
  <p>E.g.</p>
  
  <pre><code>int type = sensor.getType();
  
  switch (type) {
      case Sensor.TYPE_ACCELEROMETER:
      // log accelerometer data
      break;
  
  case Sensor.TYPE_GYROSCOPE:
      // Log gyroscope data
      break;
  
  ...
  </code></pre>
  
  <p>My question is, what is the most efficient (less battery power consuming) way, having in mind that I registered the listener with SENSOR_DELAY_FASTEST ? Having one listener for every sensor or having one listener and separating the sensors with a switch?</p>
  
  <p>Thank you very much in advance</p>
  
  <p>Minos</p>