views:

433

answers:

3

Hi

Is there any way to emulate a Barcode scaning? My application runs on a Motorola MC9090 Windows mobile device that have Scanner. I'm using Symbol.Barcode class to create my application in .net c#.

thank's in advance

A: 

The default setup on these scanners is keyboard emulation so you should be able to just type your barcode for the same effect.

Austin Salonen
How would you emulate a barcode scanner through a keyboard? Aren't you referring to the hardware buttons on such a device?
tomlog
A: 

I'm using the MC9090 a lot myself and have not yet found a way of emulating the scanner behaviour. The only way to debug things is directly debugging on a test scanner.

Thorsten Dittmar
A: 

Emulating the scanner is like emulating just about anything in programming and my guess is you're looking at the problem wrong. Whatever is consuming the "scanner" should be consuming an interface, not an implementation (see the "D" in SOLID). This would allow you to create a separate implementation that is an emulated version of the hardware.

Now in this case there probably aren't a lot of things you need in the interface - maybe some setup/initialization, enable/disable and an even or delegate for data reception.

ctacke