thomasgalliker / Plugin.FirebasePushNotifications

Receive and handle firebase push notifications in .NET MAUI apps
MIT License
63 stars 5 forks source link

[Bug] Notification channel 'DefaultChannel' has importance 'Default' - But it is set to high in config #89

Open NGumby opened 1 day ago

NGumby commented 1 day ago

Description

I get this log when receiving a notification and the app is killed - 2024-11-04 14:15:23.8287|Info|CSNativeApp.App|MainPage ctor [EOL] 2024-11-04 14:15:24.1098|Info|CSNativeApp.App|WebViewService.Initialize [EOL] 2024-11-04 14:15:24.4180|Debug|Plugin.FirebasePushNotifications.Platforms.FirebasePushNotificationManager|ConfigurePlatform [EOL] 2024-11-04 14:15:24.4233|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|SetNotificationChannelGroups: notificationChannelGroupRequests=[] [EOL] 2024-11-04 14:15:24.4295|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|DeleteNotificationChannelGroups: groupIds=[] [EOL] 2024-11-04 14:15:24.4295|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|CreateNotificationChannelGroups: notificationChannelGroupRequests=[] [EOL] 2024-11-04 14:15:24.4354|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|SetNotificationChannels: notificationChannelRequests=[DefaultChannel] [EOL] 2024-11-04 14:15:24.4449|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|DeleteNotificationChannels: channelIds=[] [EOL] 2024-11-04 14:15:24.4511|Debug|Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannels|CreateNotificationChannels: notificationChannelRequests=[DefaultChannel] [EOL] 2024-11-04 14:15:24.5004|Debug|Plugin.FirebasePushNotifications.Platforms.PNFirebaseMessagingService|HandleIntent: Action=com.google.android.c2dm.intent.RECEIVE [EOL] 2024-11-04 14:15:24.5294|Debug|Plugin.FirebasePushNotifications.Platforms.FirebasePushNotificationManager|HandleNotificationReceived [EOL] 2024-11-04 14:15:24.5465|Debug|Plugin.FirebasePushNotifications.Platforms.FirebasePushNotificationManager|HandleNotificationReceived queues event "NotificationReceived" into PersistentQueue for deferred delivery [EOL] 2024-11-04 14:15:24.5547|Debug|Plugin.FirebasePushNotifications.Model.Queues.PersistentQueue|WriteQueueFile: fileInfo=/data/user/0/ca.compusport.compusport/files/Documents/FirebaseQueues/notificationReceivedQueue.json [EOL] 2024-11-04 14:15:25.0419|Debug|CSNativeApp.App|OnReceived AcknowledgeNotification 31446792 [EOL] 2024-11-04 14:15:25.2902|Debug|Plugin.FirebasePushNotifications.Platforms.NotificationBuilder|OnNotificationReceived [EOL] 2024-11-04 14:15:25.3244|Warn|Plugin.FirebasePushNotifications.Platforms.NotificationBuilder|Notification channel 'DefaultChannel' has importance 'Default' which is lower than notification importance 'High'

But it is set to high in UseFirebasePushNotifications

Steps to Reproduce

Here's my code: o.Android.DefaultNotificationChannelImportance = Android.App.NotificationImportance.High; o.Android.UseBigTextStyle = false; o.Android.DefaultColor = SharedSettings.NotificationColor.ToAndroid(); o.Android.NotificationActivityType = typeof(MainActivity); var channel =
new Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannelRequest{ ChannelId = "DefaultChannel", ChannelName = "General", Description = "The default notification channel", LockscreenVisibility = Android.App.NotificationVisibility.Public, Importance = Android.App.NotificationImportance.High, LightColor = Android.Graphics.Color.Orange, VibrationPattern = [0,100,150,150,150,200] }; o.Android.NotificationChannels = new [] { channel }; o.Android.DefaultNotificationChannelId = channel.ChannelId;

Expected Behavior

To not see this log

Actual Behavior

Basic Information

thomasgalliker commented 20 hours ago

What was the content of the notification you sent? I tried to reproduce but the warning message was not logged.