(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.

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);

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.

@Overridepublic void onComplete(Bitmap idCardBitmap, boolean faceFound)

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 ID.See SDK Error Handing

Last updated