diff --git a/GMCabsDriverAssistantSolution/App.xaml.cs b/GMCabsDriverAssistantSolution/App.xaml.cs index 6bbb44b..f7faba7 100644 --- a/GMCabsDriverAssistantSolution/App.xaml.cs +++ b/GMCabsDriverAssistantSolution/App.xaml.cs @@ -3,6 +3,7 @@ using GMCabsDriverAssistant.Services; using GMCabsDriverAssistant.Utils; using GMCabsDriverAssistantSolution.Styles; using Plugin.FirebasePushNotification; +using Plugin.SimpleAudioPlayer; using System.Diagnostics; namespace GMCabsDriverAssistantSolution; @@ -59,15 +60,15 @@ public partial class App : Application cancelledBookingResponseDto.PickUPAddress = e.Data["fromAddress"].ToString(); cancelledBookingResponseDto.DropUpAddress = e.Data["toAddress"].ToString(); MessagingCenter.Send(this, nameof(App), cancelledBookingResponseDto); - //if (Device.RuntimePlatform == Device.iOS) - //{ - // if (ShareConstant.IsInForeground) - // { - // var player = CrossSimpleAudioPlayer.Current; - // player.Load("system.wav"); - // player.Play(); - // } - //} + if (Device.RuntimePlatform == Device.iOS) + { + if (ShareConstant.IsInForeground) + { + var player = CrossSimpleAudioPlayer.Current; + player.Load("system.wav"); + player.Play(); + } + } }); } else if (e.Data["category"].ToString().Equals("BookingClearAccepted")) @@ -96,15 +97,15 @@ public partial class App : Application notification.Subject = e.Data["subject"].ToString(); notification.Body = e.Data["notification_body"].ToString(); MessagingCenter.Send(this, nameof(App), notification); - //if (Device.RuntimePlatform == Device.iOS) - //{ - // if (ShareConstant.IsInForeground) - // { - // var player = CrossSimpleAudioPlayer.Current; - // player.Load("system.wav"); - // player.Play(); - // } - //} + if (Device.RuntimePlatform == Device.iOS) + { + if (ShareConstant.IsInForeground) + { + var player = CrossSimpleAudioPlayer.Current; + player.Load("system.wav"); + player.Play(); + } + } }); } else if (e.Data["category"].ToString().Equals("IsTabletInstallation")) @@ -130,15 +131,15 @@ public partial class App : Application { Debug.WriteLine($"{e.Data["category"]}"); MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); - //if (Device.RuntimePlatform == Device.iOS) - //{ - // if (ShareConstant.IsInForeground) - // { - // var player = CrossSimpleAudioPlayer.Current; - // player.Load("system.wav"); - // player.Play(); - // } - //} + if (Device.RuntimePlatform == Device.iOS) + { + if (ShareConstant.IsInForeground) + { + var player = CrossSimpleAudioPlayer.Current; + player.Load("system.wav"); + player.Play(); + } + } }); } @@ -148,15 +149,15 @@ public partial class App : Application { Debug.WriteLine($"{e.Data["category"]}"); MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); - //if (Device.RuntimePlatform == Device.iOS) - //{ - // if (ShareConstant.IsInForeground) - // { - // var player = CrossSimpleAudioPlayer.Current; - // player.Load("newbooking.wav"); - // player.Play(); - // } - //} + if (Device.RuntimePlatform == Device.iOS) + { + if (ShareConstant.IsInForeground) + { + var player = CrossSimpleAudioPlayer.Current; + player.Load("newbooking.wav"); + player.Play(); + } + } }); }