GBG Developers

Guides   |   Android Identity Solution SDK Overview

Android Identity Solution SDK Overview


The GBG Identity Solution offers a suite of verification functionality for integration into your solution. Software Development Kits (SDKs) are available for Android, iOS and for web-based applications. A HTTP REST based API is also available for use with any programming language and platforms. This guide explains how to make use of the Android Identity Solution SDK.

The Android Identity Solution SDK can be used in several ways. Custom applications can be created to perform verifications based on photos, document images and text content. To speed up app creation, there are Smart Capture features within the SDK that can be optionally used to speed up app development. Smart Capture can guide the user with an overlay on top of the camera view in order to perform good quality captures for document and image verification.

Android SDK Examples

SDK Overview

The SDK provides a number of services to access Identity Solution functionality. Using the services is as simple as creating the service object, building a request object containing the information you wish to verify, and passing that into the service object. The response object contains the verification information.
If you’re not familiar with the Identity Solution, once the account is set up, the basic procedure to interact with it using the HTTP REST API is:

  1. Obtain an access token from an OAuth Identity Provider (IDP) such as AWS or Azure
  2. Exchange it for a GBG access token from GBG’s Identity Solution servers
  3. Attach the GBG access token to any verification request made to the Identity Solution
  4. Handle the verification responses in your application code as required

The mobile SDK provides a higher layer of functionality so that individual HTTP calls are not needed:

  1. Obtain an access token in the same manner as above, using an OAuth Identity Provider
  2. Use the SDK’s AuthService to obtain a GBG access token (optionally HTTP can be used for this step)
  3. Use any additional SDK services (examples include person verification, document image and face matching services) as required for handling your verification workflow. Inputs can be text based or image (bitmap) based. For image based workflows, use the smart capture feature in the SDK to reduce coding effort.
  4. Handle the verification responses in your application code as required

The services available are:

AuthService – This service provides a method to send the IDP access token to the GBG Identity Solution servers to obtain a GBG access token in return.
The GBG access token acts like a key to allow verification functionality in subsequent requests. Once you have obtained the access token, store it by using a TokenStore.storeAccessToken method. This service is optional if you already have a way of obtaining a GBG access token; for example, you may wish to perform the authentication and authorization on a remote server and then securely transfer the access token to the mobile device.

AddressService – This is more of a utility feature that can be used (often prior) to other services that perform identity verification. Use this service to find a list of addresses which match particular search criteria, and then to drill-down to retrieve a full address. The full address can then be used as part of identity verification using other services.
Using this service the find method is used to send the search criteria, and the response will be a list of addresses, each with an identifier. Further detail can be found by passing the identifier into the retrieve method.

VerifyPeopleService – Use this service to send text based details of a person to be verified.
To do this, a VerifyNewPersoRequest.Address.Builder method can be used with text based addresses and names. The built request is then sent to the service using a verifyNewPerson or verifyPersonId method. Use VerifyNewPerson if this is the first request in a sequence of requests. Use verifyPersonId for subsequent requests. In both cases, the returned response contains the result for that verification and the combined decision so far.

DocumentsService – This service can be used to perform a verification of a document image and return extracted and analyzed text details.
There are several ways this service can be used. One way is to upload an existing image on the mobile device, transferred as a bitmap. Another option called Smart Capture makes use of the camera to assist the user to capture a good quality document image for the service.

FacematchService – This service can be used to see if a photo matches the one from the prior document verification.
Once you have done a document verification, you can use the Facematch service. Typically the photo would be captured in the mobile app using the built-in camera and is application-dependent. The default camera application could be used as an example. The bitmap data can be sent by calling the uploadSelfie method. The response will indicate if the match was successful or not.

VerifyLivenessListener – This Liveness service prompts the user to perform live motions in from of the camera to aid in confirming that the user that is being verified is present when using the application.
The Liveness service can be used to overlay information on the screen advising the user how to hold the camera and the gesture to perform.

Using the Guides

Now that you have an overview of the SDK, proceed to the following guides. They can be read in any order, although the first five guides are in the order of a typical first workflow. The Debugging guide is useful when troubleshooting run-time issues for tokens or for any of the services.

Working with the Android SDK: First Steps
Add Maven Repository Credentials and Dependencies
Initialize the Android SDK
Obtain an Identity Provider Access Token
Obtain a GBG Access Token using the SDK
Using the Address Service
Using the Verify People Service
Using the Documents Service
Using the Facematch Service
Using the Liveness Service
Debugging with the Android Studio Network Profiler