react-native-image-scanner
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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';
    
    
  3. 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).

Package Sidebar

Install

npm i react-native-image-scanner

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

227 kB

Total Files

96

Last publish

Collaborators

  • krishna-teja