Egy pici javítás
This commit is contained in:
@@ -19,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper
|
|||||||
public static string DatabaseName = "";
|
public static string DatabaseName = "";
|
||||||
public static bool Syncronised = false;
|
public static bool Syncronised = false;
|
||||||
public static UserDTO SystemUserDTO;
|
public static UserDTO SystemUserDTO;
|
||||||
public static string ProgramVersion = "v1.1.020";
|
public static string ProgramVersion = "v1.1.023";
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
public static string ApiBaseUrl = $"https://dev.wfcapi.nuvolar.hu/";
|
public static string ApiBaseUrl = $"https://dev.wfcapi.nuvolar.hu/";
|
||||||
|
|||||||
@@ -105,16 +105,19 @@ namespace WorkFlowCheck.MAUI
|
|||||||
private void CreateNotificationChannel()
|
private void CreateNotificationChannel()
|
||||||
{
|
{
|
||||||
var soundUri = Android.Net.Uri.Parse($"android.resource://{Android.App.Application.Context.PackageName}/raw/siren_alert");
|
var soundUri = Android.Net.Uri.Parse($"android.resource://{Android.App.Application.Context.PackageName}/raw/siren_alert");
|
||||||
|
|
||||||
|
|
||||||
var audioAttributes = new AudioAttributes.Builder()
|
var audioAttributes = new AudioAttributes.Builder()
|
||||||
.SetUsage(AudioUsageKind.Notification)
|
.SetUsage(AudioUsageKind.Notification)
|
||||||
.SetContentType(AudioContentType.Sonification)
|
.SetContentType(AudioContentType.Sonification)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var channelId = $"{PackageName}.general";
|
var channelId = $"{PackageName}.general";
|
||||||
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
|
||||||
var channel = new NotificationChannel(channelId, "General", NotificationImportance.High);
|
var channel = new NotificationChannel(channelId, "General", NotificationImportance.High);
|
||||||
|
|
||||||
channel.SetSound(soundUri, audioAttributes);
|
channel.SetSound(soundUri, audioAttributes);
|
||||||
|
|
||||||
|
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
||||||
notificationManager.CreateNotificationChannel(channel);
|
notificationManager.CreateNotificationChannel(channel);
|
||||||
FirebaseCloudMessagingImplementation.ChannelId = channelId;
|
FirebaseCloudMessagingImplementation.ChannelId = channelId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user