How to send data to serve FaceMatch and Liveness – GBG IDscan Documentation

How to send data to serve FaceMatch and Liveness

For first RequiredAction: LIVENESS (FaceMatch)
Use image from a callback:

LivenessFragment.LivenessListener -> onNewImage(Bitmap)

Then populate with the image request and send to the server:

Kotlin

val request = RequestDocumentSend() 
request.setJourneyId("ResponseUpload -> JourneyID") 
request.setSelfieImage(bitmap) 
mEnterpriseService?.submitDocument(request, documentSubmittedListener)

When you get response and RequiredAction: LIVENESS again. (Structure the same as for Front of the document response in Enterprise service component)

Use AggregatedResult object from LivenessListener.onAggregatedResult and convert to the RequestLiveness using utility function convert:

LivenessFragment.LivenessListener -> onAggregatedResult(result: AggregatedResult

Kotlin

mEnterpriseService?.submitLiveness(
	RequestLiveness().convert(mJourneyID, mAggregatedResult), false,
	listener = mDocumentSubmittedListener)

Response callback is the same as: DocumentSubmittedListener

Was this page helpful?