aclec / expo-zebra-scanner

12 stars 6 forks source link

Question on requireNativeModule #6

Closed pabl-o-ce closed 1 year ago

pabl-o-ce commented 1 year ago

Hi aclec

first of all awesome lib again is me.

just a question to clear how this lib work is:

For getting control of the button events you use expo-modules-cores right... the thing is I wanna use your same idea on some other brand devices called 3nstart but on the docs on the device said that I have to use some jar libs to handle the events on the more or less same buttons.

This is different as you apply on Zebra? you use directly the name of the native module without using the jar files?

I already implement some onfocus input but is no the same UX as handling with the pure native modules

how you search for the name of the module to use?

any tip would be greatly appreciate :)

aclec commented 1 year ago

Hi,

I made the choice to use Intents that is native android events.

By this, I haven’t got to include external jar library.

In zebra device, with datawadge when you click on button it generate intents that I listen and then I make a callback to the js thread with expo-module-core.

You probably can include a jar file and use it. But I think you need to do this with Java and I never did that so I can’t tell you how to do.

pabl-o-ce commented 1 year ago

yeah thanks.

tiny little other question... So is impossible to have a function to make it execute the reader from a UI bottom using your lib?

for example to have a button on UI to have a control like the physical buttons.

aclec commented 1 year ago

Yes, I’m only listen native events.

If you want to implement a button in the app, you need to use the sdk of zebra (jar file).

But I created this module for my company because we needed to use physical buttons so I haven’t implemented other features.

pabl-o-ce commented 1 year ago

nice thanks a lot!

Have a great day!

I would get a shot on trying to implements with jar files

For what I have read this are the steps: