我正在使用 startForeground(id, notification) 创建一个来自意图服务的通知。
这里我设置了AutoCancel(true),但是当我点击通知时它没有消失?我真的很困惑。我已经尝试了几个小时的所有方法,但仍然没有成功!请帮忙!谢谢!
Random r=new Random();
int id=r.nextInt(9999);
Builder notice2=new Notification.Builder(getApplicationContext())
.setContentTitle(call.getName())
.setAutoCancel(true)
.setContentIntent(intent)
.setContentText("content")
.setSmallIcon(com.project.calltracker.R.drawable.ic_alert)
.setLargeIcon(BitmapFactory.decodeResource(getResources(), com.project.calltracker.R.drawable.ic_logo));
startForeground(id, notice2.getNotification());
这里我设置了AutoCancel(true),但是当我点击通知时它没有消失?我真的很困惑。我已经尝试了几个小时的所有方法,但仍然没有成功!请帮忙!谢谢!