NotificationTapped not working
See original GitHub issueHi,
Can you please give us an example of NotificationTapped/NotificationReceived, navigating to other page? I tried something like this but it doen’t work both android and iOS. Really appreciate any help thanks in advance.
`public App() { CrossFirebaseCloudMessaging.Current.NotificationReceived += NotificationReceived; CrossFirebaseCloudMessaging.Current.NotificationTapped += NotificationTapped; }
void NotificationReceived(object source, FCMNotificationReceivedEventArgs e) { //use e.Notification.Data await Shell.Current.GoToAsync($“//{nameof(Home)}”, true); }
void NotificationTapped(object source, FCMNotificationTappedEventArgs e) { //use e.Notification.Data await Shell.Current.GoToAsync($“//{nameof(Home)}”, true); } `
Issue Analytics
- State:
- Created 8 months ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Can't get NotificationTapped Event working #32
Describe the bug. I have the NotificationCenter.Current.NotificationTapped += Current_NotificationTapped; in the App.xaml.cs file above the ...
Read more >Xamarin.forms NotificationTapped event not fired when tap ...
1) NotificationTapped this event is not fired when you tap on notification? Some times break point will not hit.
Read more >Push notifications in .NET MAUI with Firebase
This looks useful. The problem is that I do not get FCM Token I am trying to get it just when clicking a...
Read more >Open app in specific view when push notification is tapped
The problem with this approach is that by replacing the root view controller with the new view controller, we have removed the whole...
Read more >Native Mobile Spec | Segment Documentation
One of the core components of the Segment Spec is the track method. It records any arbitrary event that the user has triggered....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try to call
CrossFirebaseCloudMessaging.Current.NotificationTapped += NotificationTapped
in yourMainPage
’s ViewModel instead of theApp
constructor.I can now confirm that it works for both android and iOS, just make sure in iOS AppDelegate.cs that there are no other method or event. also make sure that you delete the obj and bin files when you need to build/release the app.
this will work:
What I suggest is to add this on the documentation, other developers might need it.