开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜