当用户点击我的通知时,我想在那里显示AlertDialog

时间:2011-06-22 11:29:14

标签: android android-notifications

如何在通知区域中单击通知时,如何在我的活动中显示AlertDialog。 请帮忙.... 我正在使用多个状态栏通知,每个通知都有唯一的IDS。

2 个答案:

答案 0 :(得分:1)

通过让通知意图打开具有透明背景的新活动,我解决了类似的问题。然后该活动产生AlertDialog。

答案 1 :(得分:0)

将一些数据用于表示AlertDialog应显示在PendingIntent中,并将其放入通知的yourNotification.contentIntent。如果收到此AlertDialog,请显示Activity中的Intent

查看Notifications Doc

相关问题