开发者

Displaying an android dialog out of application

开发者 https://www.devze.com 2023-01-14 22:56 出处:网络
I have an application that is designed to pop up a question when a phone call ends using a BroadcastReceiver and a PhoneStateListener.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号