fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
624 stars 991 forks source link

Android - Remote notifications showing when app is open even though notifications are disabled for app #618

Open brad-bolton opened 4 years ago

brad-bolton commented 4 years ago

When notifications for my application are blocked (in device settings), they do not show up when my application is closed, as expected, however, when my application is open, the remote notifications do show.

Android Version: android 8.0.0 Cordova Version: cordova-9.0.0 FCM Version: cordova-plugin-fcm 2.1.2 "FCMPlugin"

Tested on: Physical Device: Galaxy s9+ Android Version: 9 Physical Device: Galaxy s6 Android Version: 6.0.1

I am using cordova.plugins.diagnostic.isRemoteNotificationsEnabled for a workaround and just not showing the notification if this is false.

Kinda puzzled on how this plug-in (cordova-plugin-fcm) is getting around that setting though...