Not able to get the native broadcaster working

After searching a lot and trying to get the broadcaster to work I need some help.

What I did was installing it as mentioned and tried to catch a Keyevent. But that doesn’t really work.

this.broadcaster.addEventListener('ACTION_DOWN').subscribe((event) => console.log(event));
this.broadcaster.addEventListener('KeyEvent.ACTION_DOWN').subscribe((event) => console.log(event));

What am I doing wrong here?

Thanks for any suggestion.

What does that mean?

From looking at the example this plugin seems to be for listening to custom events triggered in native (Cordova plugin) code. Are you sure it works with key events like you are trying to use it?

I thought so. If not I may understood this the wrong way.

I thought I can get native actions from the device. If not, good to know ;).

I don’t actually know - I just had a 2 minute look at the docs of the plugin. Maybe ask in the plugin Github issues if you don’t get a good answer around here.

Thanks. I already did and am waiting for some reply.

1 Like

(You might also want to open a second topic here where you ask how to solve the actual task you have, which seems to be executing some code when someone presses a specific key)