How can I display a dialog on Currently visible activity on android?
问题 My Problem is similar to this 2 year old question, I am just re posting the same problem to get the updated answers, since a lot has changed in two years. I am developing for an app for GingerBread+ devices, I have many activities and in background I receive some data from the server. Now based on that data in some cases I need to show a Dialog to the user. Problem is How do I know which the current front most activity ? What I tried, I have tried giving the getApplicationContext() while