-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Describe the bug
OnPushNotificationReceived not hit at all when push notification arrives. Only OnMessageReceived in the FirebaseMessagingService when app is in foreground. OnMessageReceived also not hit when app is in background.
Code Snippet
NotificationHub.Start(this.Application, AzureNotificationHubConstants.NotificationHubName,
AzureNotificationHubConstants.ListenConnectionString);
NotificationHub.SetListener(new AzureListener());
public class AzureListener : Java.Lang.Object, INotificationListener
{
public void OnPushNotificationReceived(Context context, INotificationMessage message)
{
Console.WriteLine($"Message received with title {message.Title} and body {message.Body}");
}
}
Expected behavior
OnPushNotificationReceived should hit when push notification is delivered
Setup (please complete the following information):
- OS: Android 11
- IDE : Visual Studio 2019
- Version of the Library used: Xamarin.Firebase.Messaging 121.0.1, Xamarin.Azure.NotificationHubs.Android 1.1.4.1, Xamarin.GooglePlayServices.Base 117.6.0, Xamarin.Android.Support.Design 28.0.0.3
Metadata
Metadata
Assignees
Labels
No labels