Nectar of the Programming Masses

    rn-local-qrdecode

    0.0.41 • Public • Published

    ###rn-local-qrdecode

    *** Still under development.

    Install:

    #install: 
    npm install rn-local-qrdecode
     
    #and link: 
    react-native link rn-local-qrdecode
     

    or you may install manually.

    Usage:

    Here is the demo (may check the examples folder of source code as well)

    import ...
     
    import LocalBarcodeRecognizer from 'rn-local-qrdecode';
     
     
    const imageBase64 = "data:image/jpeg;base64,/9j/4AA.......";
     
    type Props = {};
    export default class App extends Component<Props> {
      render() {
        return (
          <View style={styles.container}>
            <Text style={styles.welcome}>React Native Local Barcode Recoginzer Demo</Text>
            <Text>Follow images to test:</Text>
            <Image source={{uri:imageBase64}} style={{width:width,height:width}}></Image>
              <Button onPress={()=>{
                  this.recoginze();
              }} title={"Recognize"} />
          </View>
        );
      }
     
      recoginze = async ()=>{
        // Here is the demoe
         let result = await LocalBarcodeRecognizer.decode(imageBase64.replace("data:image/jpeg;base64,",""),{codeTypes:['ean13','qr']});
         alert(result);
      }
     
    }
    ...
    });
     
     

    API

     
     let result = await LocalBarcodeRecognizer.decode(base64EncodeStringWithSchema,options);
     
     

    Options

    Only codeTypes supports currently Options:

    name desc
    codeTypes the codeFormat array, no default values,at last one of follow values needed: aztec ean13 ean8 qr pdf417 upc_e datamatrix code39 code93 interleaved2of5 codabar code128 maxicode rss14 rssexpanded upc_a upc_ean

    Install

    npm i rn-local-qrdecode

    DownloadsWeekly Downloads

    4

    Version

    0.0.41

    License

    MIT

    Unpacked Size

    2.49 MB

    Total Files

    500

    Last publish

    Collaborators

    • avatar