googlesamples / android-vision

Deprecated: The Mobile Vision API is now a part of ML Kit: Check out this repo:
https://github.com/firebase/quickstart-android/tree/master/mlkit
Apache License 2.0
2.92k stars 1.73k forks source link

Builder not working in Kotlin, most of the code deprecated for Kotlin #237

Open sonnytron opened 7 years ago

sonnytron commented 7 years ago

Trying to build a face detector using Kotlin.
This code doesn't work, has no known methods:

var detector = FaceDetector.Builder 

This also doesn't work

var detector = FaceDetector() 
detector.Builder(context) 

Please update the repository to show changes to the API.

pm0733464 commented 7 years ago

Do you have an associated import statement for FaceDetector in your code?

moyheen commented 7 years ago

@sonnytron I think you should confirm first that com.google.android.gms.vision.face.FaceDetector is imported instead of android.media.FaceDetector.

bako-ak commented 6 years ago

@sonnytron here's a working example on the Kotlin https://github.com/bako-ak/face-detection