i have a service that periodically loads stuff from the net. When this happends i would like to be able to show a loader gif on the top bar of the currently active activity.
I have implemented this for now by making the service send a broadcast event, that my activities listen for, so the can update themselves accordingly.
This, however, produces a lot of annoying code, plus there is an issue when i browse away from the activity while the animation is showing.
Is there no way to do something like getContext().getCurrentlyShowingActivity() from the service?