I've setup several channels in the app. When I send a message without a channel id, the message is received and I also get a phone popup.
If I add a channel id, I still receive the message, but no phone popup.
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
{
//Change for your default notification channel id here
AzurePushNotificationManager.DefaultNotificationChannelId = NotificationConstants.NOTIFICATION_CHANNEL_ID;
//Change for your default notification channel name here
AzurePushNotificationManager.DefaultNotificationChannelName = "General";
NotificationManager notificationManager = (NotificationManager)GetSystemService(Android.Content.Context.NotificationService);
notificationManager.CreateNotificationChannel(new NotificationChannel(
NotificationConstants.NOTIFICATION_MAILERS_CHANNEL_ID,
"Mailers",
NotificationImportance.High));
notificationManager.CreateNotificationChannel(new NotificationChannel(
NotificationConstants.NOTIFICATION_REMINDER_CHANNEL_ID,
"Reminders",
NotificationImportance.High));
}
I've setup several channels in the app. When I send a message without a channel id, the message is received and I also get a phone popup. If I add a channel id, I still receive the message, but no phone popup.
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O) { //Change for your default notification channel id here AzurePushNotificationManager.DefaultNotificationChannelId = NotificationConstants.NOTIFICATION_CHANNEL_ID;
...
{ "data": { "title": "Closing Date due today", "body": "closing on property 100 main street", "priority": "high", "icon": null, "large_icon": null, "sound": null, "id": null, "channel_id": "reminder_channel", "silent": "false", "click_action": null, "custom_data": { "CustomerParcelId": "ba9109f5-44ad-4714-9c1d-c1cf32d12cae", "UserId": "de589fe4-5585-46f7-8b7a-33d960c8f295", "NotificationId": "ab55a64e-9182-4cea-ad66-7719cb500141" } } }