Closed Jassmin586 closed 4 years ago
When you call unregister()
, it deletes the existing FCM token.
By default, the Firebase SDK will then generate a new one.
In order to prevent this - i.e. so you can completely unsubscribe from all notifications - I've exposed the autoinit API functions of the Firebase SDK in the above commit, which allows you to disable autoinit and so prevent a new FCM token being created.
This will be merged to master and pushed out in the next release.
Current behavior: I try to turn off receive notifications by using
window.FirebasePlugin.unregister()
but nothing change. Notifications still show on device (check on Android).Expected behavior: Can manage receiving notifications in Android/IOS app. Is it possible?
Environment information
Cordova CLI version
9.0.0
Cordova platform version
android 8.0.0
browser 6.0.0
ios 5.0.1
Plugins & versions installed in project (including this plugin)
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-facebook4 6.0.0 "Facebook Connect"
cordova-plugin-firebasex 6.0.7 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 5.4.7 "SocialSharing"
es6-promise-plugin 4.2.2 "Promise"
Dev machine OS and version, e.g.
Linux mint
Runtime issue
Nexus 5
Android build issue:
v12.4.0
4.10
28