Skip to content

Most visited

Recently visited

navigation

ACameraDevice_StateCallbacks Struct Reference

ACameraDevice_StateCallbacks Struct Reference

#include <NdkCameraDevice.h>

Data Fields

void * context
 optional application context. More...
 
ACameraDevice_StateCallback onDisconnected
 
ACameraDevice_ErrorStateCallback onError
 

Field Documentation

§ context

void* context

optional application context.

§ onDisconnected

The function is called when a camera device is no longer available for use.

Any attempt to call API methods on this ACameraDevice will return ACAMERA_ERROR_CAMERA_DISCONNECTED. The disconnection could be due to a change in security policy or permissions; the physical disconnection of a removable camera device; or the camera being needed for a higher-priority camera API client.

Application should clean up the camera with ACameraDevice_close after this happens, as it is not recoverable until the camera can be opened again.

§ onError

The function called when a camera device has encountered a serious error.

This indicates a failure of the camera device or camera service in some way. Any attempt to call API methods on this ACameraDevice in the future will return ACAMERA_ERROR_CAMERA_DISCONNECTED.

There may still be capture completion or camera stream callbacks that will be called after this error is received.

Application should clean up the camera with ACameraDevice_close after this happens. Further attempts at recovery are error-code specific.


The documentation for this struct was generated from the following file:
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)