The Notification Channel (a feature needed only for Android O - presumably from now on) is (like) a parameter that you (usually) use to sort / manage notifications that you create locally. -
Android O introduces notification channels to provide a single system that helps users manage notifications.
This does not necessarily turn off the receipt of notifications that you do not want to receive, but (AFAIK) notifications created without the Notification Channel will not be displayed / displayed in Android O (not received! = Not displayed). those. Your device may still receive notifications, but just does not appear.
For notifications sent by topic, if the signed token is signed, it is expected that the client will process it accordingly .
For all that you have already implemented (if I understand your message correctly - subscribe and unsubscribe to topics based on some kind of switch), this is the easiest way you could get it.
If you want to completely disable alerts completely, you can call deleteInstanceId() . See my answers here and for more information.
source share