For our project i am developed an application to start Barcode scans without press the Barcode button on Motion C5.
Could you please provide info or trouble on that?
It'suse java todesign.
You can program to the MCA barcode API to accomplish the task of intializing and reading barcodes without using a button press. There are programing samples in the MCA SDK you can view to see how to do this. The three downloads you want are the MCA SDK, theJava Language Pack,and the Developers Guide which can be downloaded from here:
I have worked out a Java program to capture barcode reading on MotionComputing C5 when the hardware barcode button pressed. However, I need to have a visible window for the program and the window must havethefocus, otherwise the barcode pressed event will not be sent to my program. This maketheprogram running onbackground no working. Any sulotion?
Thanks for help.
If you use the MCA default actions,it will send the data to the window with focus. This is because there is no other way for the MCA default action process to determine where it should go. The only way around this is tomake the call to theMCA API from your application. Then you can then do what ever you want with the data from the barcode scan regardless of which window has focus.
See the MCA Developers guide at the link below for more details on the default action process.
Thank you for your quick response.
I need to have some events to trigger my program to start scan. From the MCA API, I can only install the 'Scanned' or 'ButtonClicked' event listener to the Buttons. But both of them does not receive the corresponding events when my program is not on the focus. Is there any other ways to do it?
You are not suggesting to have a loop thread in my program to do like the following:
Barcodes barcodeList = barcodeReader.getBarcodes();
But such program will constantly activate the barcode reader and not the solution I want.
If theabove is not your means. Could youhelp me with somemore detailed advises. If possible, provide me some samples with regarding the this particular issue.
Thanks and Regards,
I am working on this now with our developers. I'll update you shortly.
I spoke with our developers about your question and their feedback is that we do not send button presses to any application but the one in the foreground. This is by design so that multiple applications do not get notified that there was a button press for them. Using the API we can send captured data to a non-focus window. The API itself can be used anywhere but you have to be in the foreground to get the button pressed event. If we did not do it this way then more than one application would get the event and try to use the device, causing contention.
We do not see a work around at this point, but there may be other developers on the forum that have some suggestions for you.
Thank you for the clarification on this issue.
However, the design to prevent contention of device, i.e. only send button pressed event to the focused window, is not very optimistic. I hope it could be changed in the future.
Thanks for your feedback Harry. I will forward it to our development team.
Hello to all ,
I' new at the forum . I need some help , now to my problem I use the Mca Software C Api 2.0 for programing (Device Motion C5) now i wan't to get scan data (with the B-Button on the Device) and send the data to my application that is minimized to tooltray. How I can send the scan data only to my application.
As stated in the above thread you can only send data to the application that is in focus so if you have it minimized it is not in the focus and you cannot send data to it. There are many examples is the SDK help on how to get started programming the SDK please take a look at these
Thanks for your feedback . Now I will check the SDK examples.