I am trying to build a .net Maui app for a Zebra MC3300x (it has a built in scanner). However, I'm having a hard time finding out how to get the result from the barcode scan. For ease of visiblity I had even set it so that the scan result should be shown in a label.Text of mine.
I have tried following the advice from this link exactly like how it's posted but it still doesn't work. - text
I have tried putting a breakpoint on the start of the OnReceive but no matter how many times I scan a bar code, the OnReceive method never stops on my breakpoint which leads me to believe that the OnReceive isn't triggering when a scan is made.
I have also tried changing the "MessagingCenter.Send("Datawedge", "BarcodeScanned", scannedData);" to a WeakReferenceMessenger and had also put a breakpoint but again, it still didn't work.
Please advise on what needs to be done so that the program would recognize when a scan is made. Thanks!
UPDATE: I was able to resolve this by simply turning on the Keystroke option(profile settings from Data Wedge) and associating the profile with the .net maui program. Instead of sending intent, I instead put focus on an Entry so that whenever a bar code is scanned, the results would be written on the entry that is being focused on.
This not only worked, it also doesn't require any coding on my program since the bar code scan results simply gets written on the entry.