Monitoring Auto Focus

If the host Camera supports auto focus, and it is enabled, you can monitor the success of the auto focus operation by adding an AutoFocusCallback to the Camera object.

Listing 11-15 shows how to create and assign a simple Auto Focus Callback to a Camera object. The onAutoFocus event handler receives a Camera parameter when auto focus status has changed, and a success Boolean parameter indicating if the auto focus has been achieved.

LISTING 11-15: Monitoring auto focus camera.autoFocus(new AutoFocusCallback() {

public void onAutoFocus(boolean success, Camera camera) { // TODO Do something on Auto-Focus success

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide

Post a comment