View on GitHub
 (2 comments) (2 reactions) (0 assignees)Objective-C++ (1,402 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (1,268 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hello, I'm using this plugin in react-native thanks to : https://github.com/axemclion/react-native-cordova-plugin.

I have been able to scan a barcode and get it's data but now I'm trying to generate a barcode and I have a problem.

When I'm calling my function :

cordova.cordova.plugins.barcodeScanner.encode(
      cordova.cordova.plugins.barcodeScanner.format.ean_13,
      barcodeValue,
      function() {console.log('success')},
      function() {console.log('failed')}
  )}

I have this message : "Could not encode a barcode from the data provided".

If I put :

cordova.cordova.plugins.barcodeScanner.encode(
      cordova.cordova.plugins.barcodeScanner.Encode.TEXT_TYPE,
      "test",
      function() {console.log('success')},
      function() {console.log('failed')}
  )}

This code generate a qr_code but that's not what I want, I want a barcode.

I remenber that in android I was using the multiformatwriter class to generate my bitmap.

So is it possible to generate a barcode image or not ?

Contributor guide