我试图在按下通知后开始新活动...相关代码为:

NotificationManager notifManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

Notification note = new Notification(R.drawable.android, "New E-mail", System.currentTimeMillis());

PendingIntent intent = PendingIntent.getActivity(this, 0, new Intent(this, DatabaseActivity.class), 0);

note.setLatestEventInfo(this, "New E-mail", "You have one unread message.", intent);

notifManager.notify(NOTIF_ID, note);


但是活动只是dsnt开始..通知弹出..但是如果我单击它,没有发生...请给我建议!!!

最佳答案

请原谅明显的问题,但是清单中是否引用了DatabaseActivity?

10-07 19:30
查看更多