> For the complete documentation index, see [llms.txt](https://legacy-docs.usesmileid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.usesmileid.com/integration-options/mobile/android/smile-id-sdk/deprecated-physical-id-card-capture.md).

# (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](https://docs.usesmileid.com/integration-options/mobile/android/sdk-error-handling)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://legacy-docs.usesmileid.com/integration-options/mobile/android/smile-id-sdk/deprecated-physical-id-card-capture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
