I have checkout out the latest Google Vision APIs from here:
https://github.com/googlesamples/android-vision
And I am running it on a LG G2 device with KitKat. The only change I have made is to the minSdkVerion in the Gradle file:
...
defaultConfig {
applicationId "com.google.android.gms.samples.vision.face.multitracker"
minSdkVersion 19
...
However it does not focus. How do I make it focus?
An auto focus option is now available in the official API. See the setAutoFocusEnabled method here:
https://developers.google.com/android/reference/com/google/android/gms/vision/CameraSource.Builder.html#setAutoFocusEnabled(boolean)
Also, we open sourced the CameraSource class, which has an auto focus method as well. This one allows you to set a specific focus mode as opposed to the "continuous video" mode that the official API defaults to:
https://github.com/googlesamples/android-vision/blob/master/visionSamples/barcode-reader/app/src/main/java/com/google/android/gms/samples/vision/barcodereader/ui/camera/CameraSource.java
I modified the CameraSourcePreview (....) constructor to be as follows:
The advice was given here: https://github.com/googlesamples/android-vision/issues/2
and the code reference was here: https://gist.github.com/Gericop/7de0b9fdd7a444e53b5a
I also had to modify the FaceTrackerFactory draw(Canvas ...) method:
This worked for me Using Google Play Services 8.4: 'com.google.android.gms:play-services:8.4.0'