I’m trying to generalize my code, so I’m writing separate files with corresponding functions concerning orientation, gps, wifi, read-and-write etc. so when I need something in an app, I could simply require these files and have all the functions up and running.
I need to add corresponding listeners and set up the files as the app starts, and also adapt the module on other system events. As I wouldn’t like to write the code in the “system” event listener every time, I’m wondernig - is there a way to listen for the “system” events with multiple listeners?
The problem I’m encountering is, when I try to have “system” event listeners in both orientation and gps files, only the gps file gets the event.