Android notification channel
See original GitHub issueHi,
thank you for this great plugin and accepting the PR.
I’m still testing with the channel. When I change the description of the channel name, the settings are set back to default. The NotificationManager can retrieve the channel if it exists with GetNotificationChannel(string channelId)
.
I checked the android docs:
CharSequence name = getString(R.string.channel_name);
String description = getString(R.string.channel_description);
int importance = NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);
channel.setDescription(description);
// Register the channel with the system; you can't change the importance
// or other notification behaviors after this
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
Priority can’t bet set for each NotificationRequest, it is only working for the first. I don’t know what is better: Extend INotificationService with and AndroidCreateChannel Method and remove Priority and ChannelDescription from AndroidOptions, or creating the channel with the first NotificationRequest. With second option, the comment should be extended.
I’m wondering why the channel is recreate, when I change the channel description.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
@Freddyvdh now Multiple Notification Channels can be created once when app start.
try LocalNotification.Sample.sln in Sample/Direct folder
@Freddyvdh Creating an existing notification channel with its original values performs no operation, so it’s safe to call this code when starting an app.
https://developer.android.com/training/notify-user/channels#CreateChannel