Stay organized with collections
Save and categorize content based on your preferences.
Camera.FaceDetectionListener
public
static
interface
Camera.FaceDetectionListener
android.hardware.Camera.FaceDetectionListener
|
This interface was deprecated
in API level 21.
We recommend using the new android.hardware.camera2
API for new
applications.
Callback interface for face detected in the preview frame.
Summary
Public methods |
abstract
void
|
onFaceDetection(Face[] faces, Camera camera)
Notify the listener of the detected faces in the preview frame.
|
Public methods
onFaceDetection
public abstract void onFaceDetection (Face[] faces,
Camera camera)
Notify the listener of the detected faces in the preview frame.
Parameters |
faces |
Face : The detected faces in a list |
camera |
Camera : The Camera service object |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Camera.FaceDetectionListener\n\nAdded in [API level 14](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n21](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nCamera.FaceDetectionListener\n============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/hardware/Camera.FaceDetectionListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nCamera.FaceDetectionListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------|\n| android.hardware.Camera.FaceDetectionListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 21.** \n\nWe recommend using the new [android.hardware.camera2](/reference/android/hardware/camera2/package-summary) API for new\napplications.\n\nCallback interface for face detected in the preview frame.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onFaceDetection](/reference/android/hardware/Camera.FaceDetectionListener#onFaceDetection(android.hardware.Camera.Face[],%20android.hardware.Camera))`(`[Face[]](/reference/android/hardware/Camera.Face)` faces, `[Camera](/reference/android/hardware/Camera)` camera) ` Notify the listener of the detected faces in the preview frame. |\n\nPublic methods\n--------------\n\n### onFaceDetection\n\nAdded in [API level 14](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onFaceDetection (Face[] faces, \n Camera camera)\n```\n\nNotify the listener of the detected faces in the preview frame.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------|\n| `faces` | `Face`: The detected faces in a list \u003cbr /\u003e |\n| `camera` | `Camera`: The [Camera](/reference/android/hardware/Camera) service object \u003cbr /\u003e |"]]