I am relatively new to android programming and I am currently developing an android app with Mono Android (Xamarin). I can also convert java solution to C# so don't worry about posting java solutions :). Now to the scenario,
My app flow is like follows;
User starts the app --> App executes a background thread to check for item updates --> User is allowed to navigate through app while the thread is returned --> if there are updates, the current visible activity should show a HUD and the items must be updated.
I have tried to implement above by creating a broadcast receiver that notifies when there are updates. I then derive all the activities from a base class which listens to this broadcast and shows the HUD loader.
However, it seems all the activities in the backstack are also notified when there is an update and the same code segment that shows the HUD loader is executed multiple times. Is there any specific way to notify the top most (application owned & visible) activity so that the loader is shown only one time? Or is there any other way I could achieve this other than using broadcast receivers? Any help on this would be greatly appreciated.