18

I'm looking for a way to close a notification panel after the user pressed some button in my notification. Currently, I'm doing it like that:

sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS))

But, this way is deprecated on Android 12 and the official recommendation is to use GLOBAL_ACTION_DISMISS_NOTIFICATION_SHADE action from AccessibilityService.

Is there any way to do it somehow without AccessibilityService?

j.developer
  • 474
  • 2
  • 5
  • 15
VolodymyrH
  • 1,927
  • 2
  • 18
  • 47

0 Answers0