Search code examples
androidhardwaresoftware-design

Is it possible for my app to detect if my device has barcode scanner? (For example Zebra)


I would like to ask, if it's possible for any app to detect if device has barcode scanner connected? Like Zebra TC26. I want my app to work diffrent when there is hardware connected scanner and when there isn't any.


Solution

  • You can use the DataWedge API - Enumerate Scanners which generates an index of scanners available on the device. You can check that and change the app behaviur based on the results.

    Here's the complete list of avaliable DataWedge API's. And just in case you haven't worked with this, here's the main guide.