这是我用来在Android中创建通知的代码。这个通知按预期显示,但无法通过滑动通知来删除它。 那么我该如何以编程方式将其删除?
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(getApplicationContext(), Constants.CHANNEL_ID)
.setSmallIcon(R.drawable.small)
.setContentTitle("persistent")
.setContentText("cant remove").setOngoing(true);
mBuilder.build();