> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-sdk/react-native/standalone-modules/document-detector/faq_document_detector_sdk.md).

# FAQ

***

## **1. What is the Document Detector SDK and what is its main functionality?**

**Answer:**

The Document Detector SDK is designed to capture identity documents, such as RG, CNH, and RNE, with high-quality imaging and reliable data extraction. Instead of relying on a standard camera, it utilizes a smart camera with features like automatic capture and document detection, reducing the chance of low-quality or unusable photos. This functionality enhances onboarding processes, ensuring that documents are captured accurately and efficiently for identity verification and other secure applications.

***

## **2. What are the system requirements for the Document Detector SDK on React Native?**

**Answer:**

**React Native:** The SDK supports React Native versions that are **0.73.x** or above.

**Android:** The SDK supports Android API 26 and above, ensuring compatibility with modern Android devices. Your Android project should use a **minimum SDK version of 26**.

**iOS:** The SDK supports iOS 13 and above, ensuring compatibility with modern iOS devices. Your iOS project should use a **minimum deployment target of iOS 13**.

For more requirement details, please refer to the [Requirements section](/caf-sdk/react-native/standalone-modules/document-detector/requirements.md).

***

## **3. What permissions are required to use the SDK?**

**Answer:**

The SDK requires the following permissions:

* Android setup:
  * Camera (`android.permission.CAMERA`)
  * External Library (`android.permission.READ_EXTERNAL_STORAGE`) **Only for upload feature.**
  * Internet (`android.permission.INTERNET`)

Ensure these are added to your `AndroidManifest.xml` and handle permission requests in your app appropriately for Android versions that require runtime permission requests.

* iOS setup:
  * Camera (`Privacy - Camera Usage Description`)
  * External Library (`Privacy - Photo Library Usage Description`) **Only for upload feature.**

Ensure these are added to your `Info.plist` and handle permission requests in your app appropriately for iOS versions that require runtime permission requests.

***

## **4. How do I integrate the Document Detector SDK into my React Native project?**

**Answer:**

To integrate the SDK:

1. Add the SDK package to your project by running:

   ```sh
   npm intall @caf.io/react-native-document-detector
   ```
2. Configure the necessary permissions for camera and internet access in your app’s `AndroidManifest.xml` (for Android) and `Info.plist` (for iOS) files.
3. Complete any additional configuration in `build.gradle` (for Android) and `Podfile` (for iOS). For detailed instructions, please refer to the [Installation section](/caf-sdk/react-native/standalone-modules/document-detector/installation.md).

***

## **5. Is the Document Detector SDK compatible with Expo?**

**Answer:**

Yes, the Document Detector SDK can be used with Expo, but only in the [Bare Workflow](https://docs.expo.dev/more/glossary-of-terms/#bare-workflow), which allows for the necessary native configurations. To set up the SDK for Expo, follow these steps:

* Android setup:
  1. Add the following Maven repositories to `android/build.gradle`:

     ```gradle
     allprojects { 
         repositories { 
             ... 
             maven { url 'https://repo.combateafraude.com/android/release' }
             maven { url 'https://jitpack.io' }
         } 
     }     
     ```
  2. Ensure Java 8 compatibility by configuring `android/app/build.gradle`.

     ```gradle
     android {
         ...
         compileOptions {
             sourceCompatibility JavaVersion.VERSION_1_8
             targetCompatibility JavaVersion.VERSION_1_8
         }
     }
     ```
* iOS setup:
  1. Add the following sources to your `Podfile` to access required dependencies.

     ```ruby
     source 'https://github.com/combateafraude/iOS.git'
     source 'https://cdn.cocoapods.org'
     ```

These configurations enable the SDK to function effectively in an Expo environment with native support.

For detailed instructions, see the [Installation section](/caf-sdk/react-native/standalone-modules/document-detector/installation.md).

***

## **6. What is the current version of the SDK, and where can I find version-specific details?**

**Answer:**

The current version of the SDK is regularly updated. You can find the latest version information, including changelogs and version-specific details, [here](/caf-sdk/react-native/standalone-modules/document-detector/current-version.md).

***

## **7. How do I start the Document Detector verification process in my app?**

**Answer:**

To start the document detector, follow these steps:

1. Import and use the `startDocumentDetector` function.
2. Start the document detector activity.
3. Capture the result in the `useDocumentDetector` hook.

For more details on how to initiate the process, refer to the [Start SDK section](/caf-sdk/react-native/standalone-modules/document-detector/start-sdk.md).

***

## **8. What are the typical errors or issues that could occur, and how can I troubleshoot them?**

**Answer:**

Some common errors include:

* **Camera permission not granted**: Ensure your app requests the necessary permissions at runtime.
* **SDK initialization failure**: Check your Gradle setup and ensure the SDK is properly initialized in the app lifecycle.
* **Network errors**: Ensure the device has an active internet connection for the document detector to succeed.

For more troubleshooting details, refer to the [Typescript References section](/caf-sdk/react-native/standalone-modules/document-detector/typescript-references.md#error).


---

# 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://docs.caf.io/caf-sdk/react-native/standalone-modules/document-detector/faq_document_detector_sdk.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.
