Development
This page contains the information of Usage, Configuration, Result of OkayDoc for Android and iOS
Last updated
FaceDetectorSDK.startDetection(this, licenseKey, config, new FaceDetectorResultListener() {
@Override
public void onResultReceived(boolean successful, int errorCode, FaceAttr result) {
if (successful) {
// handle result
}
else {
// handle error
}
}
});import FaceDetectorlet config = Config.Builder()
.setPath(imagePath)
.setFaceThreshold(0.9)
.setEyeThreshold(0.5)
.build()FaceDetectorSDK.startDetection(
viewController: self,
license: license,
config: config
)
{ success, errorCode, result in
if(success) {
// handle success
} else {
// handle error
}
}public enum FaceError: Error {
// Error due to invalid parameter value in config object.
case invalidConfig(_ msg: String)
// Any other errors.
case miscellaneous(_ msg: String)
// Error due to user clicking cancel and going back.
case userCancelled
// Error due to invalid license usage.
case invalidLicense
// No error at all.
case noError
// Error due to camera permission denied by user.
case cameraPermission
// image file not found
case invalidImage
// Timeout error
case timeout
}import { detectFaceWithImage, detectFaceWithVideo } from 'react-native-innov8tif-face-detector';detectFaceWithVideo({
license: licenseKey,
base64: true,
faceThreshold: 0.5,
eyeThreshold: 0.5
})
.then(result => {
console.log(result)
})
.catch(error => {
console.log(error)
})detectFaceWithImage({
license: licenseKey,
base64: true,
path: <imagePath>
faceThreshold: 0.5,
eyeThreshold: 0.5
})
.then(result => {
console.log(result)
})
.catch(error => {
console.log(error)
})