Answer the question
In order to leave comments, you need to log in
How to distribute events among all activities?
I inherit from the Application class and create a DeviceProtocol class variable there.
DeviceProtocol is responsible for connecting to the device via BLE, because inside there are methods that require activation, then I pass this to it from SplashScreen (for this reason, I have to not destroy SplashScreen)
Next, I need to somehow make events, for example, onBatLevelUpdate, to which a bunch of other activities should subscribe.
That's actually the question, t .to. googling "android event" returns only element events
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question