Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect a Notification Channel is blocked by user in Android 8.0

Is there any callback my application receives when user blocks a Notification Channel created by my application OR it can be detected later ?

like image 560
Arnav M. Avatar asked Sep 19 '17 07:09

Arnav M.


People also ask

How do I see blocked notifications on Android?

For Android phones, this is how you can retrieve blocked messages. Open the Messages app, and click the three dots on the top right corner of the screen. From that drop-down menu, choose “Settings.” From there, tap on “Block numbers and messages.” From there, go to “Blocked messages.”

What is System silent channel notification?

Silent: Your phone won't make a sound or vibrate. But the notification will show up when you swipe down from the top of your screen.


1 Answers

Starting from Android P, there is a system broadcast for this: https://developer.android.com/reference/android/app/NotificationManager.html#ACTION_NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED

It's impossible to reliably sync our backend push servers with the channel settings without this (you have to poll...)

like image 108
rockgecko Avatar answered Oct 12 '22 17:10

rockgecko