Smile Identity

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
On android the screen is instantiated as a dialog on top of your app and on iOS the screen is instantiated as a view controller so it is important to take this into consideration if you have any navigation that is expected before or after the consent screen has been shown

Show the dialog

RnSmileId.requestConsent("<TAG>", "<COMPANY_LOGO>",<BUNDLE_ID/PACKAGE_NAME>,
  • 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 <STRING> This is a string typically the app icon name it has to be the name of an image resource in your res folder for android and or in your assets for iOS, so the user is familiar with what they will finally see which the SDK will present on the consent screen
  • BUNDLE_ID/PACKAGE_NAME <STRING> This is your app's bundle id on iOS and your app's package name on android, this will be used to fetch the resources to be shown 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.
The consent screen will be shown and this code runs asynchronously and will show the below screens for iOS and android and will return a hashmap which containts a key SID_RESULT_CODE anything other than -1 means it the user has declined consent and -1 means the user agreed to consent and you may proceed as normal