Reputation: 326
What I am looking for is a good example (if possible) of a application wide notification alert dialog window. What I am hoping to do is register an intent filter on the application level, and anytime a broadcast is received, it will show my alert above any fragment, or activity in my application.
Right now I am having to implement it on each activity, while not a big deal seems messy, I was hoping there was a better way.
I had tried to do it once before in the application but the AlertDialog requires the activity context and not the application context.
Thanks Brian
Upvotes: 1
Views: 188
Reputation: 7949
I've previously achieved this by declaring a broadcast receiver in a base class from which all my activities are derived.
Upvotes: 2