Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laserscanner Event #24

Closed
nosTa1337 opened this issue Aug 14, 2017 · 7 comments
Closed

Laserscanner Event #24

nosTa1337 opened this issue Aug 14, 2017 · 7 comments

Comments

@nosTa1337
Copy link

nosTa1337 commented Aug 14, 2017

Hi,

can anyone give me a hint how to work with a laserscanner?

I tried working with adb getevent and received the following things:

add device 5: /dev/input/event0 name: "keyremap_virtual" events: KEY (0001): KEY_F12 KEY_HOME KEY_VOLUMEUP KEY_SCALE KEY_MENU KEY_WAKEUP KEY_PROG1 KEY_BACK KEY_UNKNOWN input props: <none>

and this is appears when I show a live listener with adb

[ 119373.240199] /dev/input/event0: EV_KEY KEY_PROG1 DOWN [ 119373.240276] /dev/input/event0: EV_SYN SYN_REPORT 00000000 [ 119374.770156] /dev/input/event0: EV_KEY KEY_PROG1 UP [ 119374.770280] /dev/input/event0: EV_SYN SYN_REPORT 00000000

How can I implement this in the eventlistener now? I tried listen to "keyremap_virtual" but nothing happens.

The goal is to be able to trigger the laserscanner button anytime and receive the input to work with.

Thanks for any advice.

@bsorrentino
Copy link
Owner

Take a look to issue #17

@nosTa1337
Copy link
Author

I may forgot to mention I am using Ionic 2 and the documentation says I just need to listen to the specific event:

https://ionicframework.com/docs/native/broadcaster/

// Listen to events from Native this.broadcaster.addEventListener('eventName').subscribe((event) => console.log(event));

I think if I do it that way I just need to know the correct event name. But I didn't manage to find it out yet.

@bsorrentino
Copy link
Owner

bsorrentino commented Sep 23, 2017

The only events that you could handle using plugin are the ones fired through LocalBroadcaster.
This means that if laserscan events are fired in different way you have to bridge them.
To have an idea how to do this take a look at #17

@CjoyHome
Copy link

Are you successful?

@CjoyHome
Copy link

I am using Ionic 2, But I
this.broadcaster.addEventListener('android.intent.action.PACKAGE_ADDED').subscribe((event) =>
It is unsuccessful

@bsorrentino
Copy link
Owner

relate to #34

@bsorrentino
Copy link
Owner

closed for inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants