I've implemented Firebase Cloud Messaging in my android app.
Is it possible to turn notifications off from my application settings screen?
It was possible with old GCM as we have broadcast GcmReceiver
and we could handle it ourselves.
Now we have only FirebaseInstanceIdService
and could handle it only when app is in foreground.
How we can handle it when app is in background?
Is it possible only to disable Firebase Cloud Messaging only for some category of notification inside app or this should be done on the server side?
I came with the solution to send request to the server if I need to switch on/off some type of notifications. And if send request to switch off some notification server will no longer trigger FCM server to send notification to the device
You can manage whether or not notifications are displayed by always sending data messages from your app server. The Firebase console always sends notification messages, which are the types of messages that generate notifications automatically when your app is in the background. So if you want full control of when notifications are displayed use data messages which are only available from your app server, not yet from the Firebase console. See more on message types here.