我需要使用带有点击事件的通知,我有通知方法,但这个方法不能打开我的活动。
我的代码:
这是可能的吗,谢谢。
我的代码:
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());
}
这是可能的吗,谢谢。
setContentIntent()
。 - David Wasser