LogoLogo
  • Welcome!
  • GETTING STARTED
    • Signing Up
    • Choose a Product
    • Choose an Integration Option
    • Run Your First Test Job
    • Complete Your KYC
    • Fund Your Wallet
    • Go Live!
    • Pricing
  • SUPPORTED ID TYPES & DOCUMENTS
    • For Individuals (KYC)
      • Using ID Number
        • Supported Countries
          • Côte d'Ivoire
            • National ID (without Photo)
            • Resident ID (without Photo)
          • Ghana
            • Ghana Card
            • Passport
            • Voter's ID
          • Kenya
            • Alien Card
            • KRA Pin
            • National ID
            • National ID (without Photo)
            • Passport
            • Tax Information
          • Nigeria
            • Bank Account
            • BVN
            • NIN V2
            • NIN Slip Verification
            • V_NIN (Virtual NIN)
            • Phone Number
            • Voter's ID
          • South Africa
            • National ID
            • National ID (without Photo)
            • Phone Number
          • Uganda
            • National ID (without Photo)
            • Basic KYC in Uganda
          • Zambia
            • Bank Account
            • TPIN
          • Zimbabwe
            • National ID (without Photo)
        • Test Data
          • Customising Sandbox Test Data
        • ID Number Regex
        • Visual Samples of Supported ID Types
      • Using Document Image
        • Continents
          • Africa
          • Asia and the Middle East
          • Europe
          • North America
          • Oceania
          • South America
    • For Businesses (KYB)
      • Supported Countries
        • Nigeria
          • Business Registration
          • Tax Information
        • Kenya
          • Business Registration
        • South Africa
          • Business Registration
      • ID Number Regex
  • PRODUCTS
    • For Individuals (KYC)
      • AML Check
        • AML News Media
      • Basic KYC
      • Biometric KYC
      • Digital Address Verification
      • Document Verification
        • Document Verification
        • Enhanced Document Verification
      • Electronic Signature
      • Enhanced KYC
      • Phone Number Verification
      • SmartSelfie™ Authentication
      • SmartSelfie™ Compare
      • Smile Secure
    • For Businesses (KYB)
      • Business Verification
  • Integration Options
    • Mobile
      • Getting Started
      • Products
        • Biometric KYC
        • BVN Consent
        • Document Verification
        • Enhanced Document Verification
        • Enhanced KYC
        • SmartSelfie™ Enrollment and Authentication
        • Enhanced SmartSelfie™ Enrollment And Authentication
      • Customization
        • UI Components
      • Offline Mode
      • Release Notes
        • Android Release Notes
        • iOS Release Notes
        • Flutter Release Notes
        • React Native Release Notes
    • No-Code
      • Smile Links
        • Link FAQs
        • Rest API
    • Server to Server
      • Ruby
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • KYB - Business Verification
          • AML Check
        • Generate Token for Web Integration
        • Utilities
      • Python
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • Java
        • Release Notes
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
      • Node.js
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • Enhanced Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • PHP
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
    • Rest API
      • Signing your API Request
        • Using Signature
      • Products
      • Postman Collection
      • Utilities
    • Web / Mobile Web
      • Web Integration
        • Installation
        • Usage
        • End User Consent
        • Support
      • Javascript SDK
        • Installation
        • Usage
        • Migration
        • Deprecated Version
          • Installation
          • Usage
          • Notes
          • Support
  • FURTHER READING
    • FAQs
      • What are your support hours?
      • How do I set up a callback?
      • How to re-enroll, deactivate or delete a user?
      • Add or remove team members
      • What are top-level keys?
      • What are partner_params?
      • How do job types map to the new product names?
      • Is there an API I can use to monitor my wallet balance?
      • Is there an API I can query to check the availability status of an ID type?
      • How do I integrate Smile ID in other countries or query other ID types?
      • What are the image types I can upload to Smile ID?
      • Why aren't Kenyan IDs returning images for some IDs queried?
      • Why are some of my bank verification requests returning 'ID authority unavailable'?
      • How can I look up a specific user's data?
      • Selfie best-practices
      • Document capture best-practices
      • What happens under the hood?
      • Guide to the user consent screen
      • What is code 2302?
      • Using the Demo App and Scanning QR codes
    • Job status
    • KYC receipts
    • Result codes
      • Error codes
    • Securing your account with two-factor authentication (2FA)
    • Security Overview
    • Troubleshooting
      • Troubleshooting error 2204 & 2205 - "You're not authorized to do that"
      • Why is my Web API job taking so long?
      • Image capture issues on web client
Powered by GitBook
On this page
  • Show the consent screen
  • BVN Consent Screen

Was this helpful?

  1. Integration Options
  2. Mobile
  3. Android v7 (deprecated)

Consent Screen

The SDK has prebuilt screens to request consent from a user before running a job which may return personal identifiable information. This gives the user control and also ensures compliance

Last updated 11 months ago

Was this helpful?

The screen is instantiated as a dialog on top of your app so it is important to take this into consideration if you have any navigation that is expected and whether to show it from a fragment or from an activity

Show the consent screen

  1. The below snippet will show the consent dialog

Intent intent = new Intent(<CONTEXT>, ConsentActivity.class);
intent.putExtra(ConsentActivity.TAG, <TAG>);
intent.putExtra(ConsentActivity.PARTNER_LOGO, BitmapFactory.decodeResource(getResources(), R.drawable.<COMPANY_LOGO>));
intent.putExtra(ConsentActivity.PARTNER_NAME, <COMPANY_NAME>);
intent.putExtra(ConsentActivity.PRIVACY_LINK, <PRIVACY_URL>);
startActivityForResult(intent, USER_CONSENT_REQUEST_CODE);
  • TAG <STRING>This is important that it matches the same tag which may have been or will be used to capture the selfie and or id card document as it will determine if the job will be submitted or not when consent is required for the id type

  • COMPANY_LOGO <BITMAP> This is a bitmap typically the app icon, so the user is familiar with what they will finally see which the SDK will present on the consent screen

  • COMPANY_NAME <STRING>This is the company name that will be presented on the consent screen

  • PRIVACY_URL <STRING> This is a link to a valid web page that contains your company's privacy policy the user can click this and view the privacy policy.

  • CONTEXT Android context to show the app over, typically the current activity.

This will return a result in onActivityResult which will have a tag and a result code for RESULT_OK when the user agrees and otherwise when the user disagrees

BVN Consent Screen

The SDK has prebuilt screens to request consent from a user before running a job with the BVN ID Type.

The screen is instantiated as a activity so it is important to take this into consideration if you have any navigation that is expected and whether to show it from a fragment or from an activity.

Step 1

Add a theme in your app's styles which looks like the below

<style name="AppTheme.NoActionBar">
  <item name="windowActionBar">false</item>
  <item name="windowNoTitle">true</item>
  <item name="android:windowSoftInputMode">adjustResize</item>
</style>

Step 2

Declare the smile id consent activities in your app's android manifest

<activity
    android:name="com.smileidentity.libsmileid.core.consent.ConsentActivity"
    android:exported="false"
    android:theme="@style/AppTheme.NoActionBar" />

<activity
    android:name="com.smileidentity.libsmileid.core.consent.bvn.ui.activities.ConsentBVNNumberActivity"
    android:exported="false"
    android:theme="@style/AppTheme.NoActionBar" />

<activity
    android:name="com.smileidentity.libsmileid.core.consent.bvn.ui.activities.ConsentBVNContactMethodActivity"
    android:exported="false"
    android:theme="@style/AppTheme.NoActionBar" />

<activity
    android:name="com.smileidentity.libsmileid.core.consent.bvn.ui.activities.ConsentOTPVerificationActivity"
    android:exported="false"
    android:theme="@style/AppTheme.NoActionBar" />

Step 3

Instantiate the consent config in your view lifecycle methods corresponding to onStart for either fragment or activity.

//activity/fragment example
@Override
protected void onStart() {
    super.onStart();
    sidConsentConfig = new SIDConsentConfig(this,<REQUEST_CODE>);
}

Step 4

Show the consent when ready

    sidConsentConfig.show(<TAG>,  <COMPANY_NAME>,
                            <YOUR_COMPANY_LOGO>, <ENVIRONMENT>, <PRIVACY_POLICY_URL>,"NG","BVN_MFA");

If ENVIRONMENT is set to false (for sandbox), enter the following on the screen for BVN and OTP: BVN: 00000000000 OTP: 000000 Any other BVN or OTP will return invalid errors

Variable
Description

TAG

This is a local unique job identifier which you can use to identify the end to end process for this job which should be an alphanumeric string

ID_TYPE

Can be BVN or BVN_MFA the user will be shown BVN as the id type they are consenting to

COMPANY_NAME

The company name to be shown to the user

COMPANY_LOGO

The company logo to be shown to the user which should be an image in the drawable directory ideal sizes are 48x48 mdpi 72x72 hdpi

96x96 xhdpi

144x144 xxhdpi

192x192 xxxhdpi

ENVIRONMENT

true for production and false for sandbox

PRIVACY_POLICY

A valid url to your company's privacy policy

The results will be returned in onActivityResult with the requestCode provided as per the instantiation method

  1. onError This will return an error with the tag and the error instance with a code and a message for the reason

   @Override
    protected void onActivityResult(int requestCode, int resultCode,
                                    @Nullable final Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
//         resultCode will be REULT_CANCELLED
//        data will contain the below keys
//         ERROR_VALUE =>  the error code for the failure
//         REQUEST_CODE => the request code used to request consent
//         ERROR_VALUE
        }

Possible ERROR_VALUE are

  • 777 Missing partner name

  • 778 Missing partner Logo

  • 779 Error with your configuration please check documentation

  • 780 User declined consent summary

  • 781 A network error occurred

  • 782 An error occurred with auth smile

  • 783 An error occurred after inputing the BVN number this may be the user entered an invalid BVN error or there was a connection issue whilst initiating consent

  • 784 An error occurred after selecting the mode (sms/email) or the user clicked this is likely a network or server error

  • 785 An error occurred because the presented mode of confirmation are no longer valid for the user so they clicked these are invalid

  • 786 An error occurred during OTP validation

  @Override
    protected void onActivityResult(int requestCode, int resultCode,
                                    @Nullable final Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
//         resultCode will be REULT_OK
//        data will contain the below keys
//        BVN_SESSION_ID =>  the session id for the bvn request to be used with user id info
//        TAG => the tag used to request consent
//.       USER_BVN_NUMBER => the bvn supplied by the user
//        IS_OTP_CONFIRMED => success for the otp confirmed case or if it's failed
        }

This will present the below screens and If at any point the screens encounter an api or user error these are dismissed and will return the respective result viea the BVNConsentError callback

BVN Consent Summary Screen

BVN Number Screen

BVN Mode Selection Screen

BVN OTP Screen

onSuccess This will return a success with a tag identifier, the entered bvnNumber and the sessionId to be used when submitting a job as identified in the you are running by adding a session_id key. with the value returned as sessionid as part of the SIDUserIdInfo

product