Documentation
¶
Overview ¶
Camera preview display using NativeActivity with OpenGL ES rendering.
Opens the first available camera and renders its preview to the screen using GPU-based compositing for correct aspect ratio at full screen. The camera writes to a SurfaceTexture (zero-copy GPU path), which is sampled as an OES external texture and rendered as a fullscreen quad with UV coordinates that center-crop to the display aspect ratio.
The app requests CAMERA permission at runtime via JNI. If permission is denied, a red screen and Toast message are shown.
Build:
make apk-displaycamera
Install & run:
adb install -r examples/camera/display/displaycamera.apk adb shell am start -n com.example.displaycamera/android.app.NativeActivity
Click to show internal directories.
Click to hide internal directories.