对于使用notificationBuilder创建的android通知,未在通知托盘中获取取消选项
这是我用来创建通知的代码对于使用notificationBuilder创建的android通知,未在通知托盘中获取取消选项,android,push-notification,Android,Push Notification,这是我用来创建通知的代码 notificationBuilder.setOngoing(true) .setSmallIcon(R.drawable.notifications_icon) .setContentTitle("Upload") .setContentText("image is being uploaded") .
notificationBuilder.setOngoing(true)
.setSmallIcon(R.drawable.notifications_icon)
.setContentTitle("Upload")
.setContentText("image is being uploaded")
.setProgress(0, 0, true).setAutoCancel(true).build();
我能够正确地获取通知,但无法清除它。这是因为您写道:
setOngoing(true)
这意味着您希望通知预先列出解决方案?删除此行(或将其设置为
false
),它将被解除 @RajeswariRatala很乐意帮忙!