0.0.2 • Published 9 months ago

react-native-image-scanner v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

GoApptiv Document Scanner

The GoApptiv Document Scanner is a React Native library provides functionality for scanning documents in a React Native application. It supports both Android and iOS platforms.

Installation

To use the GoApptiv Document Scanner, follow these steps:

  1. Install the package using npm or yarn:
    npm install react-native-image-scanner
  2. Import the component in your project:

    import {GaDocumentScannerAndroid} from 'react-native-image-scanner';
    import {GaDocumentScannerIos} from 'react-native-image-scanner';
```
  1. Use the component in your React Native application:

For Android:

<GaDocumentScannerAndroid
  setImageUri={setImageUri}
  source={ImageSource.CAMERA}
  onError={handleError}
  onCancel={handleCancel}
/>

For iOS:

<GaDocumentScannerIos
  setImageUri={setImageUri}
  source={ImageSource.CAMERA}
  onError={handleError}
/>

Props

The Document Scanner component accepts the following props: | Prop | Type | Description | | ----------- | ----------------------- | --------------------------------------------------------------------------------------------- | | setImageUri | (uri: string) => void | A function to set the URI of the scanned image. | | source | ImageSource enum value | The source of the image (either ImageSource.CAMERA or ImageSource.GALLERY). | | onError | Function (optional) | An optional callback function to handle errors that occur during the scanning process. | | onCancel | Function (optional) | An optional callback function to handle the cancellation of the scanning process (Android only). An optional callback function to handle the cancellation of the scanning process (only available for Android, for ios it's handled by onError itself).

0.0.2

9 months ago

0.0.1

9 months ago