ユーザーがボタンを押さずに通知をクリアできないようにする方法はありますか? 私はすでに setAutoCancel(false) を設定していますが、それは問題ありませんが、すべての通知をクリアするボタンがあり、通知をクリアしたくないため、ユーザーにとって重要であり、ユーザーはそれを読んでアクションを選択する必要があります。
NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.icon)
.setContentTitle("Sync Failed")
.setContentText("Lorem ipsum dolor sit amet")
.setStyle(new NotificationCompat.BigTextStyle().bigText("Lorem ipsum dolor sit amet"))
.addAction(R.drawable.change, "Change Pass", pChangePass)
.addAction(R.drawable.remove, "Ignore", pIgnore)
.setAutoCancel(false);
mNotificationManager.notify(accountUnique, builder.build());