when user clicks on my notification i want to show an AlertDialog there
how can i show an AlertDialog in my activity, when the notification is clicked in notification area. plz help.... i'm using multiple status bar notificati开发者_如何学Cons each with unique IDS.
I've solved a similar problem by having the notification intent open a new activity with a transparent background. The activity then spawns the AlertDialog.
Put some data to signal that an AlertDialog should be shown into a PendingIntent and put this into yourNotification.contentIntent of your notification. Display the AlertDialog from your Activity in case it receives this Intent.
Have a look at the Notifications Doc.
加载中,请稍侯......
精彩评论