ID Card Capture
ID Card Capture will capture an id card image for a tag that may be provided during initiation and if not provided this will be auto generated by the SDK and returned with a code.
ID Card Capture
ID Card Capture will capture an id card image for a tag that may be provided during initiation and if not provided this will be auto generated by the SDK and returned with a code.
Import the library
import RnSmileId from 'rn-smile-id';Capture ID Card
If you want the SDK to generate a tag for you then call the method with an empty string
const data = await RnSmileId.captureIDCard('',null);If you want the generate to use a custom tag send a string to the SDK with alphanumeric characters with the exception of an underscore and no spacing in them.
const data = await RnSmileId.captureIDCard(<STRING_TAG>,null);This will present a screen as belowID Card Capture

Get Results
The selfie capture process is an asynchronous process and will return an error code and a tag once done. The result looks as the below
�If the result code is -1 AND the tag is not null or empty then the selfie capture was successful.
Optional UI Customisations
For basic UI customisation, an additional key-value object needs to be passed as second parameter when performing a call to the library's captureSelfie(tag:"<TAG>",config:{"key":"value"})
) method, where tag is a string and config the added key-value Map containing the desired settings.
Basic Example
id_capture_side: a string value with options0,1,2 0being capture front only,1being capture front and back and2being capture back onlyid_capture_orientation: a string that determines the prompt text view on the selfie review screen; this text view refers to the one directly under the selfie image view
Last updated
Was this helpful?

