bug: android notification not triggers onMessageReceived
if the app is killed
#419
Closed
4 of 13 tasks
Labels
Plugin(s)
Did you test the latest version?
Platform(s)
Current behavior
When I trigger a notification for my Android device (it doesn't matter if silent or not) the
onMessageReceived
method of theFirebaseMessagingPlugin
is called but not forwarded to my app.I investigated the issue a bit more and the problem is that
getFirebaseMessagingPluginInstance
returns null as you can see in the screenshot. And this is because thestaticBridge
is null because the plugin (and the whole activity) is not loaded.Expected behavior
Notifications should trigger the Capacitor listener for
onMessageReceived
even if the application is killed.Reproduction
https://github.com/NLueg/android-killed-notification-issue
Steps to reproduce
It's actually not easy to provide an example for such issues as this would require publishing the firebase configuration. Do you have a solution for this? If you never heard of such a problem I will try to add it to the example
@capacitor-firebase/messaging
pluginonMessageReceived
is called)onMessageReceived
is not called)publishingOther information
Capacitor doctor
Latest Dependencies:
@capacitor/cli: 5.2.2
@capacitor/core: 5.2.2
@capacitor/android: 5.2.2
@capacitor/ios: 5.2.2
Installed Dependencies:
@capacitor/cli: 5.2.2
@capacitor/core: 5.2.2
@capacitor/ios: 5.2.2
@capacitor/android: 5.2.2
Before submitting
The text was updated successfully, but these errors were encountered: