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
Was this helpful?
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
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
The below snippet will show the consent dialog
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
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.
Add a theme in your app's styles which looks like the below
Declare the smile id consent activities in your app's android manifest
Instantiate the consent config in your view lifecycle methods corresponding to onStart for either fragment or activity.
Show the consent when ready
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
onError This will return an error with the tag and the error instance with a code and a message for the reason
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
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
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