(Deprecated) Physical ID Card Capture
In the layout file associated with your SIDIDCardCaptureActivity class that will capture the id card, add a SurfaceView. The surface view is used to set up a CaptureIDCard View component, a Camera Preview specifically designed to detect an ID card.
1
mCameraPreview = findViewById(R.id.<SURFACE_VIEW_ID>);​mCaptureIDCard = new CaptureIDCard(this, $UNIQUE_TAG,// <= This should match the tag used for selfie capture and should be unique per job mCameraPreview);mCaptureIDCard.setOnCompleteListener(this);mCaptureIDCard.extractProminentFaceFromID(true);
Copied!
The CaptureIdCard View is used by tapping the camera preview in order to capture the photo of the physical ID card. Once a the Camera has been tapped you hit the onCompleteListener. CaptureIdCard View is designed to detect a face on the ID card. The onCompleteListener will inform you whether a face was detected, you will have the option to continue if a face is not found or request the user to try capture the ID card again.
1
@Overridepublic void onComplete(Bitmap idCardBitmap, boolean faceFound)
Copied!
The onCompleteListener also provides you with a Bitmap of the Physical ID card photo taken. Which can be used in an ImageView to show the user a preview of the image captured, or can be sent to your internal servers.
The SDK is aware of the image using the $UNIQUE_TAG , this is used to find the image in the phone's storage in order to send to Smile Identity.
Last modified 4mo ago
Copy link