Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/hardware/SensorEventListener2#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/SensorEventListener2#inhmethods)

# SensorEventListener2

*** ** * ** ***

` public interface SensorEventListener2 `   
` implements https://developer.android.com/reference/android/hardware/SensorEventListener `

|---|
| android.hardware.SensorEventListener2 |

Known indirect subclasses [SensorEventCallback](https://developer.android.com/reference/android/hardware/SensorEventCallback) [SensorEventCallback](https://developer.android.com/reference/android/hardware/SensorEventCallback) Used for receiving sensor additional information frames.   

*** ** * ** ***

Used for receiving a notification when a flush() has been successfully completed.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/hardware/SensorEventListener2#onFlushCompleted(android.hardware.Sensor)(https://developer.android.com/reference/android/hardware/Sensor sensor) ` Called after flush() is completed. |

### Inherited methods

From interface ` https://developer.android.com/reference/android/hardware/SensorEventListener ` ` abstract void` ` https://developer.android.com/reference/android/hardware/SensorEventListener#onAccuracyChanged(android.hardware.Sensor,%20int)(https://developer.android.com/reference/android/hardware/Sensor sensor, int accuracy) `

Called when the accuracy of the registered sensor has changed.
` abstract void` ` https://developer.android.com/reference/android/hardware/SensorEventListener#onSensorChanged(android.hardware.SensorEvent)(https://developer.android.com/reference/android/hardware/SensorEvent event) `

Called when there is a new sensor event.

## Public methods

### onFlushCompleted

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onFlushCompleted (Sensor sensor)
```

Called after flush() is completed. All the events in the batch at the point when the flush was called have been delivered to the applications registered for those sensor events. In `https://developer.android.com/reference/android/os/Build.VERSION_CODES#KITKAT`, applications may receive flush complete events even if some other application has called flush() on the same sensor. Starting with `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, flush Complete events are sent ONLY to the application that has explicitly called flush(). If the hardware FIFO is flushed due to some other application calling flush(), flush complete event is not delivered to this application.

<br />

<br />

| Parameters ||
|---|---|
| `sensor` | `Sensor`: The `https://developer.android.com/reference/android/hardware/Sensor` on which flush was called. <br /> |

**See also:**

- `https://developer.android.com/reference/android/hardware/SensorManager#flush(android.hardware.SensorEventListener)`