Open
Description
It would be nice to ve an event listener api to detect if the app is running in background or foreground. Because depending on which current state the app is you could be able to trigger a specific socket event. For example I would like to show notifications just only when the app is minimized or not visible.
Maybe some alternative to give support for this feature could be to implement a LifecycleObserver at the android-native-apis: https://stackoverflow.com/questions/20469619/detecting-android-application-going-to-background
Also being able to detect another kind of events would be neat! :)