【发布时间】:2011-08-25 03:58:04
【问题描述】:
我正在使用以下代码在通过 AlarmManager 启动服务时启动通知:
nm = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
CharSequence from = "App";
CharSequence message = "Getting Latest Info...";
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(), 0);
Notification notif = new Notification(R.drawable.icon,
"Getting Latest Info...", System.currentTimeMillis());
notif.setLatestEventInfo(this, from, message, contentIntent);
nm.notify(1, notif);
我如何为这个项目设置一个意图,以便当用户点击它时,它会启动某个活动?
【问题讨论】:
标签: android notificationmanager