star-micronics / StarXpand-SDK-Android

StarXpand SDK for Android is a software development kit for supporting application development for Star Micronics devices.
https://star-m.jp/starxpandsdk-oml.html
Other
14 stars 2 forks source link

Want to get data for Scanner connected to printer when scanned by Scanner #10

Closed mehtahardikr closed 6 months ago

mehtahardikr commented 1 year ago

I have Zebra scanner attached with printer usb ports. DS 9308. I want to monitor that devcie for scanned data and i also want printer to print the receipt. When scanner device scans data i want to retireve that data as well. Is there any way to do this.

Your printer

Your development environment

ProductName: macOS ProductVersion: 12.6.3 BuildVersion: 21G419

Additional context

I want to achieve something like get data from the scanner attached to printer through USB and Printer is attached to Android device running on Android OS 9 (Pie) and want to capture data scanned by Scanner without monitor input device as its creating memory issue if we monitor for more than 10 minutes.

YuzoKato commented 1 year ago

mC-Print3 supports USB HID class only. Please make sure that your scanner is HID class.

Then, you can use an event-based API to get the data read by the barcode reader. When the barcode is read, the onDataReceived method of the InputDeviceDelegate class is called, and the barcode data can be obtained. Refer to the sample contained in the SDK as well.

Tatsuki-Yamamoto2731 commented 6 months ago

I am closing this Issue. If you still have this issue, please reopen it.