display

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 15 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL