# Camera.FaceDetectionListener

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

# Camera.FaceDetectionListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/hardware/Camera.FaceDetectionListener "View this page in Kotlin")\|Java

`
public
static


interface
Camera.FaceDetectionListener
`  
`


`

|-----------------------------------------------|
| android.hardware.Camera.FaceDetectionListener |

<br />

*** ** * ** ***

<br />

**This interface was deprecated in API level 21.**   
We recommend using the new[android.hardware.camera2](https://developer.android.com/reference/android/hardware/camera2/package-summary)API for new applications.

Callback interface for face detected in the preview frame.

## Summary

|                                                                                                                                                                                                                   ### Public methods                                                                                                                                                                                                                    ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onFaceDetection](https://developer.android.com/reference/android/hardware/Camera.FaceDetectionListener#onFaceDetection(android.hardware.Camera.Face[],%20android.hardware.Camera))`(`[Face[]](https://developer.android.com/reference/android/hardware/Camera.Face)` faces, `[Camera](https://developer.android.com/reference/android/hardware/Camera)` camera) ` Notify the listener of the detected faces in the preview frame. |

## Public methods

### onFaceDetection

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

```
public abstract void onFaceDetection (Face[] faces, 
                Camera camera)
```

Notify the listener of the detected faces in the preview frame.

<br />

|                                                      Parameters                                                       ||
|----------|-------------------------------------------------------------------------------------------------------------|
| `faces`  | `Face`: The detected faces in a list <br />                                                                 |
| `camera` | `Camera`: The[Camera](https://developer.android.com/reference/android/hardware/Camera)service object <br /> |