Display a Back-Facing Camera Full-Screen Preview

For this initial camera app shown below, we’ll display the view seen by the back-facing Android camera. The illustration shows a camera preview image at a resolution of 1280×768 pixels, displayed on the touch screen of a Google Nexus 6, whose resolution is 2560 ×1440 pixels.

images/Camera/GettingStarted.png

We’ll use the KetaiCamera class to connect to and start the camera. The KetaiCamera class streamlines this process significantly for us. For example, creating a simple camera preview app using KetaiCamera takes about ten lines of code, compared with about three hundred documented on the Android developer site.[121] KetaiCamera ...

Get Rapid Android Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.