【发布时间】:2012-02-15 22:59:36
【问题描述】:
Notification notifyDetails = new Notification(R.drawable.msg,"message received",System.currentTimeMillis());
PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW), 0);
我正在使用广播接收器来通知传入消息。收到消息时,我可以在通知栏中显示我自己的通知。当用户点击它时,我需要它转到收件箱或当前收到的消息。
PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW, People.CONTENT_URI), 0);
// notifyDetails.setLatestEventInfo(context, "Time has been Reset", "Click on me to view Contacts", myIntent);
就像这里,当用户点击它会转到 android 中的联系人。所以我传递的意图是当用户点击它时它会进入收件箱。
【问题讨论】: