Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Android notification while app is in foreground not calling callback function #15

Open
steosoft opened this issue Jun 19, 2019 · 2 comments

Comments

@steosoft
Copy link

steosoft commented Jun 19, 2019

On Android when application is in foreground, incoming push notification is not calling callback function which is set by:

window.FirebasePlugin.onNotificationOpen(function (notification) {
        console.log(notification);
      }, function (error) {
        console.log("onNotificationOpen error " + error);
      });

and also not showing notification.
On iOS notification shows and also callback if fired.

In Android native application method onMessageReceived(RemoteMessage remoteMessage) is called when app is in foreground and we can access to incoming notification by calling remoteMessage.getNotification()

Cordova lib should also run callback as in native application when in foreground.

@Swamp3
Copy link

Swamp3 commented Jun 21, 2019

I am having this problem aswell, onNotificationOpen is not called when the app is in foreground.

@tusharvikky
Copy link

Any update here? or any ionicnative plugin which we can use, which supports onMessage instead of just onNotificationOpen?

ryanmtaylor pushed a commit to ryanmtaylor/cordova-plugin-firebase that referenced this issue Dec 23, 2019
- Document dependency on Cocoapods. Resolves wizpanda#15.
- Make min iOS version configurable. Resolves wizpanda#14.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants