Android
This document explains how to integrate the Orba One authentication flow into your android application.
1. Install as a Gradle Plugin
The SDK works on API 21+. To fetch with Gradle, make sure you add the Orba One maven repository in your root project's build.gradle file:
Then add the following dependency to your app build.gradle file. You should replace the +
with your desired version of the SDK.
Now sync your build gradle to install the sdk.
2. Initializing the SDK
The Orba One SDK uses a publishable api key and an applicant id that you can obtain from your vendor dashboard. Your Publishable Api key and Applicant Id will be needed in order to initialize the SDK in your mobile app. A sample implementation is shown below.
3. Handling Verifications
Orba One exposes two callbacks in order to let you know if the user has completed or cancelled the verification flow. A third callback (onStartVerification) is also supplied to alert you if the user has successfully began the flow.
4. Customizing the Flow
To customize the verification flow, you can simply make use of the sdk's builder class. All customization must be done before starting the flow.
5. Customizing the Document Capture Step
To customize the document capture step, you can simply make use of the sdk's DocumentCaptureStep builder class. By using this builder class, you are able to exclude specified documents and countries from the capture flow. All customization must be done before starting the flow.
6. Customizing the Theme
To ensure that Orba One fits in to your app's existing user experience, you can customize various colors by overriding the following in your colors.xml
file.
orbaColorPrimary
: Defines the background color of the Toolbar.
orbaColorPrimaryDark
: Defines the background color of the Statusbar.
orbaColorAccent
: Defines the outline of the play button as well as other details found in alert dialogs.
orbaColorTextPrimary
: Defines the text color of the Title in the Toolbar.
orbaColorTextSecondary
: Defines the text color of the Sub-title in the Toolbar.
orbaColorButtonPrimary
: Defines the background color of Primary Buttons and the text color of Secondary Buttons.
orbaColorButtonPrimaryText
: Defines the text color of Primary Buttons.
orbaColorButtonPrimaryPressed
: Defines the background color of Primary Buttons when pressed.
Sample App
A sample app demonstrating the Orba One SDK's implementation has been included. See the AndroidSample directory for the Android - Java implementation.
Support
Please post all issues through Github. If your query involves sensitive information, you may contact us at dev@orba.io with the subject ANDROID ISSUE:
.
Last updated