npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scanflow-react-native-text

v0.0.13

Published

Scanflow is an AI scanner on smart devices for data capture from Barcode, Qrcode, Text, IDs, Safety codes

Downloads

14

Readme

scanflow-react-native-text

Welcome to Scanflow SDK Scanflow is an AI scanner on smart devices for data capture & workflow automation Kit that captures multiple data from Barcode, Qrcode, Text, IDs, Safety codes

Generating a Scanflow License Key

Purchase a License Key

  1. Create a free test account at https://console.scanflow.ai/ if you do not already have one if you want to use Scanflow.
  2. Visit https://console.scanflow.ai/login to access your account.
  3. Click "Create native SDK licensing key" and input the bundle ID for your project if you don't yet have a license key for your app.
  4. he license key should be copied.

Generating a Scanflow License - Android

You need a license key to utilize the Scanflow SDK in your application. 

You must determine the applicationId of your Android app to generate a license key for your application. An applicationId is used to generate each license. If your applicationId changes, a new license key must be generated. Please be aware that you cannot use your license key with other programmers.

In your build.gradle file

The applicationId for your app may be found in the build.gradle file of the Android Project. Under Android > DefaultConfig > ApplicationId, it will be displayed. 

In your AndroidManifest.xml

You must use the package name of your application as described in AndroidManifest.xml if the applicationId is not used in the build.gradle file. 

React Native Platforms

Add the SDK

Installation

The Scanflow Core library comprises core utilities specifically designed for barcode scanning purposes. These utilities provide essential functionality and tools necessary for seamless barcode scanning within your application. By incorporating the Scanflow library into your project, you can leverage these core utilities to enhance your barcode scanning capabilities and streamline related processes. Start by installing the following command:

npm install scanflow-react-native-core

If you already have the required libraries installed and they are up to date, there is no need to execute the above command for installation.

Library Installation

Start by installing the Scanflow AI Capture SDK library in your project. You can do this by running the following command:

npm install scanflow-react-native-core
npm install scanflow-react-native-text

For RN Version v71

npm install [email protected]

This will install the required dependencies.

Permission - Android

Important: To access real-time data and ensure the proper functioning of the library, your application requires an active internet connection and the necessary camera permissions for Scanflow AI Barcode Scanner. Please add the following line to your AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.CAMERA" /> 
<uses-feature android:name="android.hardware.camera.flash" /> 
<permission android:name="android.permission.FLASHLIGHT" /> 
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" 
android:maxSdkVersion="28" /> 

This will grant the required camera permission to the application, enabling the Scanflow AI Barcode Scanner to capture barcode data effectively.

Usage

import { DatacaptureTextView } from "scanflow-react-native-text";

<DatacaptureTextView 
      LicenseKey={'YOUR SCANFLOW LICENSE KEY MUST BE ENTER HERE'}
      isBeepSound={true}
      isScanType={scanType}
      isVibrartion={true}
      isAutoFlashlight={true}
      isAutoExposure={true}
      isContinuousScan={true}
      isAutoZoom={true}
      setCameraResolution={'FULL_HD_1080P'}
/>

Setup Barcode Scanner Configuration

The following props are explained in detail:

License key (type: String) The license key prop is a string value that represents the unique identifier or authorization code required to activate and authenticate the scanflow.

isScanType (type: predefined String) The Barcode Scanner has six different features

    1. Tire DOT Scan 
        It allows you to read text from Tyre (DOT Scan). We have our own enhancement pipeline to read text from Tyres will be performed 
    2. Tire VIN Scan 
        It allows you to read text from Tyre (VIM Scan). We have our own enhancement pipeline to read text from Tyres will be performed. 
    3.Vertical Container Scanning
        It allows you to read vertical text from Containers. We have our own enhancement pipeline to read text from Containers will be performed.
    4. Horizontal Container Scanning
       It allows you to read horizontal text from Containers. We have our own enhancement pipeline to read text from Containers will be performed.   
       

IsBeepSound (type:boolen)

    1. The isBeepSound prop is a boolean value that controls whether or not a beep sound is played in a specific scenario. 

    2. When set to true, the component or feature associated with the isBeepSound prop will generate an audible beep sound to provide feedback or indicate a successful operation.  

    3. On the other hand, when set to false, the beep sound will be disabled. 

    4. By toggling the isBeepSound prop based on your application's specific requirements, you can customize the presence or absence of the beep sound, aligning it with your desired user experience and interaction design. 

IsVibrartion (type:boolen) 1. The isVibration prop is a boolean value that controls whether or not vibration feedback is enabled in a specific scenario.

    2.  When set to `true`, the component or feature associated with the `isVibration` prop will trigger device vibration to provide haptic feedback or indicate a successful operation.   

    3.  On the other hand, when set to `false`, the vibration feedback will be disabled.  

    4. By toggling the `isVibration` prop based on your application's specific needs, you can customize the presence or absence of vibration feedback, aligning it with your desired user experience and interaction design. 

IsAutoFlashLight (type:boolen)

    The isAutoFlashlight prop is a boolean value that determines whether the flashlight on the device is automatically enabled or disabled in a while scanning. 

IsAutoExposure (type:boolen)

    The isAutoExposure prop is a boolean value that controls whether the exposure of a camera or image capture feature is automatically adjusted based on lighting conditions (true) or manually adjusted (false). 

IsContinuousScan (type:boolen)

    The isContinuousScan prop is a boolean value that determines whether the scanning process continues automatically after detecting a barcode (true) or stops after scanning one barcode (false). 

IsAutoZoom (type:boolen)

    The isAutoZoom prop is a boolean value that determines whether the zoom level of a camera or image capture feature is automatically adjusted based on certain conditions (true) or requires manual adjustment (false). 

SetCameraResolution (type:predefinedString)

    1. SD_480P 
         Standard Definition (480p) is a video resolution option that offers moderate image quality and lower file sizes suitable for playback on various devices and streaming platforms. 

    2. HD_720P 
         High Definition (720p) is a video resolution option that provides enhanced image quality with sharper details, making it ideal for high-quality video playback on HD-compatible screens. 

    3. FULL_HD_1080P 
         Full HD (1080p) is a video resolution option that delivers excellent image quality with crisp and detailed visuals, suitable for larger screens and immersive viewing experiences. 

    4.UHD_4K 
         Ultra HD (4K) is a video resolution option that offers incredibly high image quality with exceptional clarity and vividness, providing an immersive and lifelike viewing experience on compatible screens. 

Barcode Result Listener:

    useEffect(() => { 
        eventEmitter.addListener('onBatchScanResult', onBatchScanResultSuccess); 
        eventEmitter.addListener('onOneOfManyCodeResult', onOneOfManyCodeResult); 
        eventEmitter.addListener('onOneofManyCodeRemoved', onOneofManyCodeRemoved); 
        eventEmitter.addListener('onOneofManyCodeSelected',onOneofManyCodeSelected); 
        eventEmitter.addListener('onScanBarcodeDetection', onScanBarcodeDetection); 
        eventEmitter.addListener('onScanResultFailure', onScanResultFailure); 
        eventEmitter.addListener('onScanResultSuccess', onScanResultSuccess); 

        return () => { 
        eventEmitter.removeAllListeners('onBatchScanResult'); 
        eventEmitter.removeAllListeners('onOneOfManyCodeResult'); 
        eventEmitter.removeAllListeners('onOneofManyCodeRemoved'); 
        eventEmitter.removeAllListeners('onOneofManyCodeSelected'); 
        eventEmitter.removeAllListeners('onScanBarcodeDetection'); 
        eventEmitter.removeAllListeners('onScanResultFailure'); 
        eventEmitter.removeAllListeners('onScanResultSuccess'); 
        }; 
        }); 


        function onBatchScanResultSuccess(data: any) { 
        } 

        function onOneOfManyCodeResult(data: any) { 
        } 

        function onOneofManyCodeRemoved(data: any) { 
        } 

        function onOneofManyCodeSelected(data: any) { 
        } 

        function onScanBarcodeDetection(data: any) { 
        } 

        function onScanResultFailure(data: any) { 
        } 

        function onScanResultSuccess(data: any) { 
        } 

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library