Displaying an android dialog out of application
I have an application that is designed to pop up a question when a phone call ends using a BroadcastReceiver and a PhoneStateListener.
My problem is, when a call is received while the user is not currently using my application, the dialog is not displayed until the application is manually started. I would like either for the dialog to be displayed on top of what ever 开发者_开发知识库context the user is currently in, or that my application will be focused.
How is this done?
The answer is in this thread: Android - How to display a dialog over a native screen?
Any chance your app can create an Activity with the Dialog theme, and you trigger that activity with an Intent? Other than that, if it's informational, you can use a Toast.
精彩评论