I have an heir to Service
and heir to BroadcastReceiver
.
How in real-time service to catch events that occur in BroadcastReceiver to respond to them? You must listen to the listener :)
It comes to mind only thread with a time cycle in the Service
which will periodically check the state in the BroadcastReceiver
but then the same can be done without the BroadcastReceiver
. Or maybe you need to create some kind of common interface?