Hey Marie!
I have not used that widget personally, but knowing a little bit about the onBarCodeRead function called by RNCamera component you might get more back than just text data.
The widget itself calls this function when it scans a barcode.
private onBarCodeRead(event: { data: string }): void {
if (this.props.barcode.status !== ValueStatus.Available || !event.data) {
return;
}
if (event.data !== this.props.barcode.value) {
this.props.barcode.setValue(event.data);
}
executeAction(this.props.onDetect);
}
Currently only “data” from the event is passed in, but there should also be a “rawData” variable available to you which should be the bytes. You can then encode the bytes into whatever text encoding you used to create the barcode.
So you can just modify the Widget code and include the rawData in your onBarCodeRead function.
private onBarCodeRead(event: { data: string, rawData: any }): void {
This is just an idea on something to try. Not exactly sure if it will work. But I think it might.