Stay organized with collections
Save and categorize content based on your preferences.
Camera.ErrorCallback
public
static
interface
Camera.ErrorCallback
android.hardware.Camera.ErrorCallback
|
This interface was deprecated
in API level 21.
We recommend using the new android.hardware.camera2
API for new
applications.
Callback interface for camera error notification.
Summary
Public methods |
abstract
void
|
onError(int error, Camera camera)
Callback for camera errors.
|
Public methods
onError
public abstract void onError (int error,
Camera camera)
Callback for camera errors.
Parameters |
error |
int : error code:
|
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.ErrorCallback\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n21](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nCamera.ErrorCallback\n====================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/hardware/Camera.ErrorCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nCamera.ErrorCallback\n`\n\n\n`\n\n\n`\n\n|---------------------------------------|\n| android.hardware.Camera.ErrorCallback |\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 camera error notification. \n**See also:**\n\n- [Camera.setErrorCallback(ErrorCallback)](/reference/android/hardware/Camera#setErrorCallback(android.hardware.Camera.ErrorCallback))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onError](/reference/android/hardware/Camera.ErrorCallback#onError(int,%20android.hardware.Camera))`(int error, `[Camera](/reference/android/hardware/Camera)` camera) ` Callback for camera errors. |\n\nPublic methods\n--------------\n\n### onError\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onError (int error, \n Camera camera)\n```\n\nCallback for camera errors.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `error` | `int`: error code: - [Camera.CAMERA_ERROR_UNKNOWN](/reference/android/hardware/Camera#CAMERA_ERROR_UNKNOWN) - [Camera.CAMERA_ERROR_SERVER_DIED](/reference/android/hardware/Camera#CAMERA_ERROR_SERVER_DIED) \u003cbr /\u003e |\n| `camera` | `Camera`: the Camera service object \u003cbr /\u003e |"]]