Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

BarcodeScanner Encode Method doest not work

$
0
0

@isot wrote:

I want to create a barcode on my device but when I use Encode method of Barcodscanner I don’t get any thing on my screen and it says " encoded data is not defined ". I spent many hours to find a solution but I didn’t. Can someone who knows the solution help me?

*I have installed all barcode plugins

Here is my code:

import { BarcodeScanner, BarcodeScannerOptions } from ‘@ionic-native/barcode-scanner’;

constructor( private barcode : BarcodeScanner ) {

this.barcode.encode(this.barcode.Encode.TEXT_TYPE,“lol”).then((encodedData) => {
console.log(encodedData);
}, (err) => {
console.log("Error occured : " + err);
});

}

return:

message

“encodedData is not defined”

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>