【发布时间】:2019-10-16 08:35:27
【问题描述】:
我在更新进度时更新通知,每次我得到一个不在我的代码中的日志时:
D/Notification: allPendingIntents
通知创建代码:
mProgressNotifBuilder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification)
.setPriority(Notification.PRIORITY_HIGH)
.setContentTitle(notifTitle)
.setAutoCancel(false)
.setProgress(MAX_PROGRESS, 0, true)
.setContentIntent(getPendingIntent());
setOfflineNotificationChannelId();
Notification notification = mProgressNotifBuilder.build();
startForeground(NOTIF_ID, notification);
mNotificationManager.notify(NOTIF_ID, notification);
更新通知代码:
private void updateNotificationProgress(int present) {
mProgressNotifBuilder.setProgress(MAX_PROGRESS, present, false);
mNotificationManager.notify(NOTIF_ID, mProgressNotifBuilder.build());
}
此日志是什么意思,我该如何解决?
【问题讨论】:
-
通知到达时点击通知是否关闭?
-
嘿,你找到解决办法了吗?
-
@Biscuit 不,还没有!如果您有同样的问题,请投票。
标签: android logging notifications android-notifications android-pendingintent