Is there a way to detect which activity is visible at the moment?
I have an activity that is launched whenever the server sends an asynchronous message, but if the user hasn't answered the previous message I don't want to take over the screen to display the new message. So I need to know if there is an Activity running of a particular type before launching.
I know I could just store this is inside the application, but I was wondering if there was a native way of doing it.
EDIT: And I do need this... so if you don't know the answer don't say "You will never need this"
EDIT 2: The application is not for the market, and its for a company that will have it running in the Galaxy Tab by itself
Thanks