I haven't seen a sample mainly because there isn's anything too special.
If the device you have has the datawedge app installed, when its turned on - you can scan any barcode and it should input the data into the field that has focus - doesn't matter the app.
When you combine this with the library that Erel posted - you can use that event to detect when someone scans data into a field and then respond with an appropriate action.
If you don't have the datawedge application - you can get it from the motorola solutions website - just look under downloads for the model you have.