Vedi su GitHub
 (2 commenti) (2 reazioni) (0 assegnatari)Objective-C++ (1402 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (1268 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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 ?

Guida contributor