Skip to main content

Bio Login with Backend V1

Flow overviewFlowchart of Bio Login with this backend. Expand to view it, click the chart to enlarge.

Bio Login with backend V1

  • B1: configure (backend V1), set the event listener with AmaniEvent().setListener(...), start the session.
  • B2: capture with a selfie module.
  • B3: set the upload source to UploadSource.BIO_LOGIN.
  • B4: upload the selfie. If the upload fails, do not call upload() again: the data is cleared after it. Open the selfie again (a new fragment, or the old one with your own fragment handling, e.g. popBackStack), capture, then upload, up to your own max attempt. On V1 isSuccess is true when the status is OK or PENDING_REVIEW, and the verdict arrives in stepsResult / profileStatus after the upload.
  • B5: after the verdict has arrived, set the upload source back to UploadSource.KYC. Not inside the upload callback: the verdict is fetched after it and still reads the upload source.

When setting up Amani for Bio Login, you can use any module under the Selfie Module sections.

After initializing the Amani SDK and at any time before the upload function is called under the Selfie module, you need to set the upload source. You can set the upload source as follows.

Set Upload Source​

Add the imports below:

import ai.amani.sdk.Amani

Then set the upload source for Bio Login as shown below:

Amani.sharedInstance().setUploadSource("bio_login")

Full Use Case​

In this usecase example, Manual Selfie was used. You can use other Selfie types in a similar way by selecting them from the selfie module.

  1. Navigate the Selfie fragment.
  2. Give upload source as bio_login before upload function called in the step 3.
  3. Trigger the upload function with the Selfie data coming from the Selfie fragment callback in the step 1.