Skip to content

[Question] Android Not Receiving IFirebasePushNotification.NotificationReceived Event #125

@jamesbdarcy

Description

@jamesbdarcy

Thomas

Your plugin is wonderful. Thank you.

I have been able to successfully integrate the plugin and have it working for both Android and iOS. I am receiving Push notifications from FCM on both OS's whether the app is stopped, in background or forground. Fabulous!

There is one anomoly, however.

I have placed event handlers for the IFirebasePushNotification events within the App.xaml.cs file, rather than a Page, as I would like to be notified at all times when an event comes in and not rely on the user being on a page. I have placed the event handlers in App.xaml.cs, rather than Platform/Android/MainActivity as I would like to be notified of the TokenRefreshed, NotificationAction and NotificationReceived events on both OS's.

Placing them in App.xaml.cs works fine for iOS but not in Android.

In Android I do receive the NotificationAction when the user selcts an action but I do not receive either of the other two events, NotificationReceived and TokenRefreshed.

Is there a reason that these events are not being raised on the Android platform? Note, that I am receiving the actual Push Notifications, but the library events are not being raised.

I hope you can assist.

Kind regards

James

Metadata

Metadata

Labels

help wantedExtra attention is neededs/needs-reproAttach a solution or code which reproduces the issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions