Using OzCapsula Data Container in Native SDK
To use Oz Data Container, implement new methods: AnalysisRequest.addContainer for adding data for analysis and createMediaCaptureScreen(request) for video capture. This method takes a video and packages it into a data container. Please check the methods and properties below.
addContainer
This method replaces addAnalysis in the AnalysisRequest structure when you use the data container flow.
Input
Parameter
Type
Description
OzDataContainer
bytearray[]
An encrypted file containing media and collateral info, the output of the createMediaCaptureScreen method
createMediaCaptureScreen
Captures media file with all information you need and packages it into a data container.
Input
Parameter
Type
Description
session_token
String
Stores additional information to protect against replay attacks
Output
Parameter
Type
Description
OzDataContainer
bytearray[]
An encrypted file containing media and collateral info
public data class CaptureRequest
Detects a request for video capture.
Parameter
Type
Description
analysisProfileList
List<AnalysisProfile>
A list of objects that contain information on media and analyses that should be applied to them
folderMeta (optional)
Map<String, Any>
Additional folder metadata
additionalMediaList (optional)
List<MediaRequest>
Media files that you need to upload to server, but it’s not necessary for analyses
cameraPosition (optional)
String
front (default) – front camera
back – rear camera
public data class AnalysisProfile
Contains information on media files and analyses that should be applied to them.
Parameter
Type
Description
params (optional)
Map<String, Any>
Additional analysis parameters
public sealed class MediaRequest
Stores information about a media file.
Please note: you should add actionMedia OR userMedia, these parameters are mutually exclusive.
Parameter
Type
Description
id
String (UUID v4)
Media ID
actionMedia
OzAction (Android) or OzVerificationMovement (iOS)
An action that user should perform in a video
userMedia
OzAbstractMedia (Android) or OZMedia (iOS)
An external media file, e.g., a reference or a document photo
Code Examples
Kotlin
Swift
Exceptions
Error
Text
Description
session_token_is_empty
Session token must not be empty
Session token is mandatory but hasn’t been provided
data_container_internal_failure_1
Internal failure occurred while processing the data container
The device doesn’t have enough memory to proceed
data_container_internal_failure_2
data_container_internal_failure_3
data_container_internal_failure_4
Internal failure occurred while processing the data container
SDK couldn’t generate the container. Try again
data_container_internal_failure_1000
Internal failure occurred while processing the data container
Any other error not from the list above
If, during the video capture, SDK encounters an error that prevents user scenario from completion, the data container is deleted.
Should you have any questions, please contact us.
Last updated
Was this helpful?
