I can override the push notification when app is in running mode with my custom notification. But when the app is in background or killed i am getting the default notification from the firebase cloud messaging.
[Service(Exported = true)]
[IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })]
public class AsdFirebaseMessagingService : FirebaseMessagingService
{
private const int NotificationId = 0;
public override void OnMessageReceived(RemoteMessage remoteMessage)
{
base.OnMessageReceived(remoteMessage);
Console.WriteLine("Message Received");
if (remoteMessage.Data.TryGetValue("title", out var title) &&
remoteMessage.Data.TryGetValue("body", out var body))
{
ShowNotification(title, body);
}
}
}
I can override the push notification when app is in running mode with my custom notification. But when the app is in background or killed i am getting the default notification from the firebase cloud messaging.
[Service(Exported = true)] [IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })] public class AsdFirebaseMessagingService : FirebaseMessagingService { private const int NotificationId = 0;