Skip to content

Cordova

1. The following values have been renamed:

  • InitializationConfigurationInitConfig
  • FaceSDK.presentFaceCaptureActivity()FaceSDK.startFaceCapture()
  • FaceSDK.matchFacesSimilarityThresholdSplit()FaceSDK.splitComparedFaces()
  • MatchFacesSimilarityThresholdSplitComparedFacesSplit
  • *.bitmap*.image

2. Added missing classes, such as InitResponse and LivenessConfig.

3. Reworked functions that had similar versions accepting a configuration object, such as FaceSDK.initialize() and FaceSDK.initializeWithConfig(config: any).

Now, it is a single function that can accept null instead of a configuration object:

FaceSDK.initialize(null, function (m) { }, function (e) { })

FaceSDK.initialize({}, function (m) { }, function (e) { })

FaceSDK.initialize({
  license: "base64"
}, function (m) { }, function (e) { })

var config = new InitConfig()
config.license = "base64"
FaceSDK.initialize(config, function (m) { }, function (e) { })

4. Functions FaceSDK.setUiCustomizationLayer(any) and FaceSDK.setUiConfiguration(any) are combined into FaceSDK.setCustomization(customization: Customization).

5. Callbacks for synchronous functions without a return value have been disabled, as they don't return anything.

The full list of functions with disabled successCallback:

setServiceUrl
setLocalizationDictionary
setRequestHeaders
setCustomization
deinitialize
stopFaceCapture
stopLiveness

6. Due to the current architecture design, you still need to pass a callback as a function parameter. However, you can use an empty callback function (s) { } as it will never be executed. Here is a comparative example:

FaceSDK.setLocalizationDictionary(dictionary, function (result) {
  console.log("Localization dictionary applied!")
}, function (e) { })
FaceSDK.setLocalizationDictionary(dictionary, function (s) { }, function (e) { })
console.log("Localization dictionary applied!")