Egy pici javítás
This commit is contained in:
@@ -105,16 +105,19 @@ namespace WorkFlowCheck.MAUI
|
||||
private void CreateNotificationChannel()
|
||||
{
|
||||
var soundUri = Android.Net.Uri.Parse($"android.resource://{Android.App.Application.Context.PackageName}/raw/siren_alert");
|
||||
|
||||
|
||||
var audioAttributes = new AudioAttributes.Builder()
|
||||
.SetUsage(AudioUsageKind.Notification)
|
||||
.SetContentType(AudioContentType.Sonification)
|
||||
.Build();
|
||||
|
||||
var channelId = $"{PackageName}.general";
|
||||
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
||||
var channel = new NotificationChannel(channelId, "General", NotificationImportance.High);
|
||||
|
||||
channel.SetSound(soundUri, audioAttributes);
|
||||
|
||||
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
||||
notificationManager.CreateNotificationChannel(channel);
|
||||
FirebaseCloudMessagingImplementation.ChannelId = channelId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user