【发布时间】:2012-02-02 14:49:26
【问题描述】:
我想发出一个通知,点击它会将我的应用程序从后台带到前台。我正在使用以下代码:
NotificationManager noma = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
PendingIntent pen = PendingIntent.getActivity(Timer.this, 0, intent, 0);
intent.putExtra("key", "trigerred");
String body = "This is a message";
String title = "This is title";
Notification no = new Notification(R.drawable.ic_launcher, body, System.currentTimeMillis());
no.defaults = Notification.DEFAULT_ALL;
no.setLatestEventInfo(this, title, body, pen);
noma.notify(uniqueID, no);
当我点击创建新意图的通知但我希望将最后创建的意图带到前面时。我该怎么做?
【问题讨论】:
-
发布你的意图对象的代码。
标签: android