This section contains "old" documentation on Android and iOS SDK.
SDK contains IOzForensicsAPI interface describing APO net calls that can be used to create a Retrofit instance.
This interface uses a gson-converter and operates classes from the com.ozforensics.liveness.sdk.api.model
pack.
Apart from this, the interface specifies a static method for creating a default Retrofit instance (without logging, interceptors and with 15-second timeouts). This instance will look for the server at the specified address:
SDK includes the OzForensicsService
class that uses a Retrofit instance from OzForensicsAPI.create()
. This class wraps in net calls from the Retrofit interface and checks the presence of a token. When an auth request is performed, the token is stored automatically for internal goals. Also, the required metadata is added where necessary when performing the net requests (creating a folder, uploading media data to be analyzed). The method calls of this class are asynchronous (the StatusListener<>
interface is used). You can obtain an instance of this class as follows:
If the TOKEN
parameter value is set to null
, authorization is required before performing any API call (except auth):
After a successful request, onSuccessCallback
is performed so that the access token can be transferred with AuthResponse
.
Please note: this method only works if your SDK version is below 3.0.0. If it is 3.0.0 or higher, please use the methods listed above.
Data to be uploaded and analyzed are stored in object results (see above), obtained after capturing and recording video. Upload it to the server and initiate the necessary analyses with the help of Oz API.
A simple scenario of interaction with Oz API can be implemented with the OZSDK.analyse
method as described below.
The completion
| resolution
block will contain the result of the assigned analysis including status (status of the analysis), type (type of the analysis), and folderID
(ID of the Oz API folder).
To perform a cross-functional analysis based on video and document photos, use the OZSDK.documentAnalyse
method:
The completion
| resolution
block will contain the result of the assigned analysis (similar to OZSDK.analyse
), where folderResolutionStatus
is the general status of analyses for the folder.
For both documents and face check, you can use the OZSDK.uploadAndAnalyse
method:
The resolution
block will contain the result of the assigned analysis (similar to OZSDK.analyse
and OZSDK.documentAnalyse
).
The methods below are used to analyze media on the device.
Biometry:
Liveness:
Data to be uploaded and analyzed is stored in object sdkMediaResult, obtained after capturing and recording video. Upload it to the server and initiate required analyses via .
A simple scenario of interaction with Oz API can be implemented with theuploadMediaAndAnalyze
method as described below.
To run the on-device analyses instead of server-based, use the following methods: