I have a service running in background and when some conditions are met I need to show a window at the top of the activity. I should be able to navigate between activities and that window should always stay static on top till the user dismiss it.
Options:
I tried with an activity using Dialog Theme. The problem with this approach is that it will be on top of the activity that was at that instant. If I open another activity the "activity dialog" will be behind this new activity.
I thought to implement a BaseActivity that has a frame layout in order to show this "window" every time you open a new Activity. The problem is that is being show again and it shouldn't, the window should be static meanwhile the activities are changing. Also not sure how to call transaction manager inside a service to add the fragment.
I read something about having a Service that will attach a View on the Window Manager. The problem with this is that I am not sure if it's a good practice.
Any thoughts? Thanks!