Skip to content
Shiny.NET
Commercial SupportGuaranteed response times on Shiny bug fixes, straight from the maintainers. Plans from US$1,500 a year.See the plans

Channels

Channels group notifications by type and control their behavior (sound, importance, actions). On Android, channels map directly to system notification channels. On iOS, Shiny manages channels internally.

Property Type Default Description
Identifier string required Unique channel ID
Description string? null Human-readable description
Importance ChannelImportance Normal Priority level
Sound ChannelSound Default Sound setting
CustomSoundPath string? null Path for custom sounds
Actions List<ChannelAction> empty Action buttons

Shiny provides a built-in default channel.

var defaultChannel = Channel.Default;
// Identifier: "Notifications", Importance: Low
INotificationManager notifications; // injected
// Simple channel
notifications.AddChannel(new Channel
{
Identifier = "orders",
Description = "Order notifications",
Importance = ChannelImportance.High,
Sound = ChannelSound.Default
});
// Channel with action buttons
var channel = Channel.Create("messages",
ChannelAction.Create("reply", "Reply", ChannelActionType.TextReply),
ChannelAction.Create("dismiss", "Dismiss", ChannelActionType.Destructive)
);
notifications.AddChannel(channel);
Value Description
Low No sound, minimal visual
Normal Default sound and visual
High Sound, may peek on screen
Critical Urgent, may override DND
Value Description
None Silent
Default System default sound
High High-priority sound
Custom Custom sound file (set CustomSoundPath)

Action buttons appear on the notification, allowing quick interaction.

// Text reply action
ChannelAction.Create("reply", "Reply", ChannelActionType.TextReply);
// Destructive action (red on iOS)
ChannelAction.Create("delete", "Delete", ChannelActionType.Destructive);
// Opens the app
ChannelAction.Create("open", "View", ChannelActionType.OpenApp);
// Default (no special behavior)
ChannelAction.Create("ack", "OK", ChannelActionType.None);

An action runs straight from the lock screen by default. For an action with a real-world effect, such as “Close Garage” or “Disarm”, set RequiresUnlock. The user has to unlock the device before the action reaches your INotificationDelegate, and the app is not brought to the foreground. It combines with any action type.

var channel = Channel.Create("garage",
ChannelAction.Create("close", "Close Garage", ChannelActionType.None, requiresUnlock: true),
ChannelAction.Create("ignore", "Ignore")
);
notifications.AddChannel(channel);
Platform Behavior
iOS / Mac Catalyst / macOS UNNotificationActionOptions.AuthenticationRequired
Android 12+ (API 31) NotificationCompat.Action.Builder.setAuthenticationRequired(true)
Android 11 and below Not supported - the action runs without prompting
Windows / Linux Ignored
// Get a specific channel
var channel = notifications.GetChannel("orders");
// Get all channels
var channels = notifications.GetChannels();
// Remove a channel
notifications.RemoveChannel("orders");
// Clear all channels
notifications.ClearChannels();