ZeroG
ZeroG

Reputation: 121

Android Notification - Popup dialog box

i am trying to create a dialog box to appear in the middle of the screen when my main program is not in focus and running in background. The purpose of the dialog box is to force the user to take an immediate action. I am already using the notification manager to notify the user but i would still like a old school popup dialog box.

Thanks :D

Upvotes: 3

Views: 9660

Answers (2)

Sampath
Sampath

Reputation: 1202

Popping up a dialog from an application running in the background is thought of as bad practice because it may confuse the user, and may annoy the user because you are disrupting the current task s/he is engaged in.

It is advised by the Android developers to use the Android notification system for tasks like these. A guide to create notifications is here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

Upvotes: 3

mvrck
mvrck

Reputation: 522

Dialogs are created with the Intent of the current activity. Since your app will not be in focus at the time, you cannot create a dialog.

Upvotes: 0

Related Questions