Android autofocus [Solved]

Hi there!

Quick question: How can I use autofocus on android?

There’s a method .setAutoFocus in ofxAndroidVideoGrabber.h, but I’m using ofVideoGrabber in my app (as in the androidCameraExample), so this method isn’t available in my grabber instance.

If I include ofxAndroidVideoGrabber.h and use this instead of ofVideoGrabber, I don’t have a draw function anymore (although ofxAndroidVideoGrabber inherits from ofBaseVideoGrabber). Shouldn’t this work?

Apparently I don’t understand how this stuff is supposed to be used, could someone enlighten me a little? :smile:

Best and thanks again,

ofVideoPlayer internally uses ofxAndroidVideoGrabber when you are on android, you can access it and call setAutoFocus like:


Thank you very much! :smile: