Barcode scan with dedicated device

I have built a barcode scanner for a client, and they would also like to use the scanner on a device that has a barcode scanner using a 2D imager (SE4770)

How can I use that via Expo?

Hi @webjay

I do not believe you will be able to use Expo’s BarCodeScanner module for this.

I have never tried to integrate a hardware barcode scanner before, but I know older 1D scanners used to basically pretend to be a keyboard. So you plug it into a computer, for example, and whatever you scan gets “typed” into whatever text field currently has the focus.

For something like the SE4770 I suspect there’s an SDK you can use to integrate into an Android app. I did poke around a bit on the site and I found some mention of an SDK for Android, but not sure it’s the right one. It has a list of supported devices, but SE4770 was not on that list :man_shrugging:

If they have a React Native SDK, that would be best. Then you might just need to write a config plugin to integrate it into an Expo app.

If they don’t have a React Native SDK, but they have an SDK for Android native apps, then you should be able to create an Expo module for it using the Expo Modules API docs and the channel on Discord.

In either case you would be able to npm install it and then make calls to it from your JavaScript code.

1 Like

Hi @wodin.

Thank you for your thorough answer.

Yes, I have seen another app use it, where one just make it type in a text field.
My worry is, if I want each scan in its own text field, if I can have the app create new fields as fast as the scan comes in.

I think it would be best to find out if the SDK they have will allow you to call a function to fetch the results of a scan, or else have some sort of “onBarCodeScanned” callback.

First see if they have a React Native SDK or if someone else has written a wrapper that you can use.

Maybe someone on their forums has some suggestions.

Otherwise, it looks like there are a couple of sample apps here:

Maybe see if you can get those to work as plain, native Android apps first.

Then see if you can write a wrapper library that you can turn into an Expo module.

1 Like

thank you @wodin, I’ll try to find someone who have built something close.
I’m good at code, but lost in hardware :slight_smile: