From 254ab86d03931547e60cfa0da7e2adfc679a2f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Fri, 16 May 2025 08:40:33 +0200 Subject: [PATCH] =?UTF-8?q?Egy=20pici=20jav=C3=ADt=C3=A1s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs | 2 +- src/WorkFlowCheck.MAUI/Platforms/Android/MainActivity.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs index 6eb3b6d..500d10f 100644 --- a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs +++ b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs @@ -19,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper public static string DatabaseName = ""; public static bool Syncronised = false; public static UserDTO SystemUserDTO; - public static string ProgramVersion = "v1.1.020"; + public static string ProgramVersion = "v1.1.023"; #if DEBUG public static string ApiBaseUrl = $"https://dev.wfcapi.nuvolar.hu/"; diff --git a/src/WorkFlowCheck.MAUI/Platforms/Android/MainActivity.cs b/src/WorkFlowCheck.MAUI/Platforms/Android/MainActivity.cs index 64eef11..d32f1bb 100644 --- a/src/WorkFlowCheck.MAUI/Platforms/Android/MainActivity.cs +++ b/src/WorkFlowCheck.MAUI/Platforms/Android/MainActivity.cs @@ -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;