I have a broadcast receiver that I want to transmit to activity, but if and only if activity is visible. I do not want to run it if it is no longer visible. Is there any opportunity for this? Or a way to convey this, but not be active? Or, if you know that a way for activity to register as a broadcast receiver that would also work, I suppose.
android android-activity broadcastreceiver
Androider
source share