i want to show the user an alert dialog message, that he can choose yes/no but i want to do that automatical even and mainly when my app is not forground,
like clock alarm, that can jump up to screen in any situation (even if user in call)..
how to do that? i succeed to do alert.. but its came up just when my app is forground :/ using this guide: http://www.androidhive.info/2011/09/how-to-show-alert-dialog-in-android/
please help me, thank's.
You can't, AFAIK, a
Dialog
needs anActivity
. An option you have that may satisfy your needs is to create anActivity
with aDialog Theme
and call this in aReceiver
. All you need to do to make it look like anAlertDialog
is to addto the
<activity>
tag in themanifest
.BroadcastReceiver