我需要使用通知点击事件,我有通知方法,但这种方法不打开我的活动。我怎样才能打开活动时通知点击
我的代码:
private void sendNotification(String msg) {
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setContentTitle("EXX")
.setSmallIcon(R.drawable.ic_launcher)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(msg))
.setContentText(msg)
.setOngoing(true);
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
}
这是可能的,
感谢。
的可能的复制13716723 /点击通知后打开应用程序) –
不重复。 OP只是缺少'setContentIntent()' –