Migration from On-Device and Hybrid
On January 1, 2027, the on-device and hybrid analysis modes will become unavailable in Oz Mobile SDKs. If you use either of them, switch to the server-based analysis: connect the SDK to Oz API and change the analysis mode.
Android SDK
Analysis.Mode.ON_DEVICE, Analysis.Mode.HYBRID
Analysis.Mode.SERVER_BASED
iOS SDK
.onDevice, .hybrid
.serverBased
Flutter SDK
Mode.onDevice, Mode.hybrid
Mode.serverBased
Connect SDK to Oz API
Specify the API URL and access token as shown below. For details and other connection options, please refer to Connecting SDK to API for Android and iOS, or to the Flutter plugin guide.
OzLivenessSDK.setApiConnection(OzConnection.fromServiceToken(host, token, sslPins))OZSDK.setApiConnection(Connection.fromServiceToken(host: "https://<link>.ozforensics.com", token: token, sslPins: pins)) { (token, error) in
}await OZSDK.setApiConnectionWithToken(token, host);Change the analysis mode
Replace the on-device or hybrid mode with the server-based one in every analysis you launch, both Liveness (QUALITY) and Biometry (face matching).
analysisCancelable = AnalysisRequest.Builder()
.addAnalysis(Analysis(Analysis.Type.QUALITY, Analysis.Mode.SERVER_BASED, mediaToAnalyze)) // was ON_DEVICE or HYBRID
.build()
.run(/* your AnalysisListener */)// for iOS, the server-based analysis is now enabled by default
let analysis = Analysis.init(media: mediaToAnalyze, type: .quality)List<Analysis> analysis = [ Analysis(Type.quality, Mode.serverBased, <media>, {}), ]; // was Mode.onDevice or Mode.hybridThe rest of your code – capturing media and handling results – stays the same. For more details, please refer to Checking Liveness and Face Biometry for Android and iOS.
Switch to the server-based SDK version (optional)
The full SDK version contains the on-device module and is larger. Once you no longer use on-device analyses, you can switch to the server-based version to reduce your app size:
Android: replace
com.ozforensics.liveness:full:VERSIONwithcom.ozforensics.liveness:sdk:VERSION.iOS, CocoaPods: replace
pod 'OZLivenessSDK'withpod 'OZLivenessSDK/Core'.iOS, SPM: remove the OZLivenessSDKOnDeviceResources library.
iOS, manual installation: remove SDKOnDeviceResources.xcframework.
For details, please refer to Adding SDK for Android and iOS.
If you used the hybrid mode
In the hybrid mode, the SDK sent media to the server only when the on-device result was uncertain. With the server-based analysis, every check is sent to Oz API.
The sizeReductionStrategy field applies only to the hybrid analysis, so you can remove it from your code.
Last updated
Was this helpful?
