Java – pop up dialog from background thread

I need a pop-up dialog box. When I receive messages from different threads, the dialog box should not depend on activity, that is, the dialog box should be displayed in the focus of the screen

Can I do it? Because each activity handles the dialog box, I think of using a service, but add a thread again. I want to avoid this situation

Any other options available?

Solution

If you try to ask how to display the dialog box when your activity is not a key activity on the user's mobile phone, try using notification Pop up dialog boxes through different applications may interrupt the user when the user performs other operations From Android UI guidelines:

Guidelines for creating notifications are as follows: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>