Documentation
¶
Overview ¶
Camera manager lifecycle example.
Demonstrates the simplest possible use of the camera package: creating a camera manager and closing it. The manager is the entry point to the Android Camera2 NDK API -- all camera discovery and device access starts here.
Prerequisites:
- This program must run on an Android device (API level 24+).
- The android.permission.CAMERA runtime permission must be granted before any camera device can be opened. Manager creation itself does not require the permission, but subsequent operations (listing cameras, opening a device) will fail with ErrPermissionDenied (-10013) without it.
- On Android 10+ the permission must be requested at runtime through the Java/Kotlin activity layer; it cannot be granted from native code alone.
Click to show internal directories.
Click to hide internal directories.