Inter-App communication for Android
Launching BioID app
The BioID facial recognition app uses standard Android Intents for inter-app communication.
In order for your Android app to open the BioID app, you must create an intent and call startActivityForResult(intent, requestCode).
To enroll a user biometrically
To verify a user biometrically
Before you begin, you have the choice
A.1 Get a Client ID
To connect with the app using BioID Connect requires a client ID and client secret. If you already registered in the app, simply use the account you created. If you do not yet have a BioID account you will first need to register. Then go to your profile and select BioID Connect to register a new client application. You will then receive your client ID and secret.
A.2 User registration and enrollment
Your end users install the BioID app and sign up for a BioID account; they will then be prompted to enroll their biometrics.
B.1 Request a trial instance of BioID Web Service (BWS)
You can apply for a trial instance of the BioID Web Service. After the trial instance has been set up you can continue to create and configure your BWS client application.
B.2 Register a BWS client application
Create and configure your BWS client application on BWS Portal.
Select your BWS Client and go to Configuartion section and create a Web API key. In the dialog window the app identifier and secret is shown. Both values are required for your app later on (the real data replacing the placeholder text for CLIENT_APP_ID and CLIENT_APP_SECRET constants in sample code below).
Take a look at the Web API endpoint for the example https://bws.bioid.com/extension (BWS-Installation Multitenant). In this case the BWS instance name is bws. This would replace the dummy text for the BWS_INSTANCE_NAME constant in the sample code below then.
For the creation of BCIDs for users in your app the following information is needed
Storage e.g. bws
Partition e.g. 12
ClassID – this is a unique number you assign to the user, e.g. 4711. The BCID with the example values from above is bws.12.4711. This value consisting from the three parts storage, partition and ClassID separated by a period ('.') would replace the dummy text for the BCID constant in the sample code. For more information about BCID take a look at Biometric Class ID.
Now you have all necessary data to call BWS!
B.3 User registration and enrollment
When you use the app with your own identity management, the app simply provides a pass-through function for enrollment and verification using the BWS token you provide, and ignores the BioID account (if any) registered to the user's device.
B.4 Request BioID Web Service (BWS) Token
The following sample code explains how to request a BWS token using the popular library Retrofit 2.
Feel free to use any network library which you are comfortable with.
For more information please take a look at Request a BWS token to be used for authorization.
B.5 Verify BWS Result
The inter-app communication is a good helper to interchange data between apps but not in a secure way. Therefore you must validate the BWS result in the callback to your app.
This can be done very simply.The BioID app calls your app back and your app receives a BWS result as access_token.
The following example code now shows you how to validate this BWS result token from your app. For more information please take a look at Fetches the result of the last biometric operation performed with the token provided.