Cross Simple Audio implemented. for booking and notifications.
This commit is contained in:
parent
05778ee8ea
commit
cfacf96e09
@ -3,6 +3,7 @@ using GMCabsDriverAssistant.Services;
|
|||||||
using GMCabsDriverAssistant.Utils;
|
using GMCabsDriverAssistant.Utils;
|
||||||
using GMCabsDriverAssistantSolution.Styles;
|
using GMCabsDriverAssistantSolution.Styles;
|
||||||
using Plugin.FirebasePushNotification;
|
using Plugin.FirebasePushNotification;
|
||||||
|
using Plugin.SimpleAudioPlayer;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace GMCabsDriverAssistantSolution;
|
namespace GMCabsDriverAssistantSolution;
|
||||||
@ -59,15 +60,15 @@ public partial class App : Application
|
|||||||
cancelledBookingResponseDto.PickUPAddress = e.Data["fromAddress"].ToString();
|
cancelledBookingResponseDto.PickUPAddress = e.Data["fromAddress"].ToString();
|
||||||
cancelledBookingResponseDto.DropUpAddress = e.Data["toAddress"].ToString();
|
cancelledBookingResponseDto.DropUpAddress = e.Data["toAddress"].ToString();
|
||||||
MessagingCenter.Send(this, nameof(App), cancelledBookingResponseDto);
|
MessagingCenter.Send(this, nameof(App), cancelledBookingResponseDto);
|
||||||
//if (Device.RuntimePlatform == Device.iOS)
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
//{
|
{
|
||||||
// if (ShareConstant.IsInForeground)
|
if (ShareConstant.IsInForeground)
|
||||||
// {
|
{
|
||||||
// var player = CrossSimpleAudioPlayer.Current;
|
var player = CrossSimpleAudioPlayer.Current;
|
||||||
// player.Load("system.wav");
|
player.Load("system.wav");
|
||||||
// player.Play();
|
player.Play();
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (e.Data["category"].ToString().Equals("BookingClearAccepted"))
|
else if (e.Data["category"].ToString().Equals("BookingClearAccepted"))
|
||||||
@ -96,15 +97,15 @@ public partial class App : Application
|
|||||||
notification.Subject = e.Data["subject"].ToString();
|
notification.Subject = e.Data["subject"].ToString();
|
||||||
notification.Body = e.Data["notification_body"].ToString();
|
notification.Body = e.Data["notification_body"].ToString();
|
||||||
MessagingCenter.Send(this, nameof(App), notification);
|
MessagingCenter.Send(this, nameof(App), notification);
|
||||||
//if (Device.RuntimePlatform == Device.iOS)
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
//{
|
{
|
||||||
// if (ShareConstant.IsInForeground)
|
if (ShareConstant.IsInForeground)
|
||||||
// {
|
{
|
||||||
// var player = CrossSimpleAudioPlayer.Current;
|
var player = CrossSimpleAudioPlayer.Current;
|
||||||
// player.Load("system.wav");
|
player.Load("system.wav");
|
||||||
// player.Play();
|
player.Play();
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (e.Data["category"].ToString().Equals("IsTabletInstallation"))
|
else if (e.Data["category"].ToString().Equals("IsTabletInstallation"))
|
||||||
@ -130,15 +131,15 @@ public partial class App : Application
|
|||||||
{
|
{
|
||||||
Debug.WriteLine($"{e.Data["category"]}");
|
Debug.WriteLine($"{e.Data["category"]}");
|
||||||
MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString());
|
MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString());
|
||||||
//if (Device.RuntimePlatform == Device.iOS)
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
//{
|
{
|
||||||
// if (ShareConstant.IsInForeground)
|
if (ShareConstant.IsInForeground)
|
||||||
// {
|
{
|
||||||
// var player = CrossSimpleAudioPlayer.Current;
|
var player = CrossSimpleAudioPlayer.Current;
|
||||||
// player.Load("system.wav");
|
player.Load("system.wav");
|
||||||
// player.Play();
|
player.Play();
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -148,15 +149,15 @@ public partial class App : Application
|
|||||||
{
|
{
|
||||||
Debug.WriteLine($"{e.Data["category"]}");
|
Debug.WriteLine($"{e.Data["category"]}");
|
||||||
MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString());
|
MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString());
|
||||||
//if (Device.RuntimePlatform == Device.iOS)
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
//{
|
{
|
||||||
// if (ShareConstant.IsInForeground)
|
if (ShareConstant.IsInForeground)
|
||||||
// {
|
{
|
||||||
// var player = CrossSimpleAudioPlayer.Current;
|
var player = CrossSimpleAudioPlayer.Current;
|
||||||
// player.Load("newbooking.wav");
|
player.Load("newbooking.wav");
|
||||||
// player.Play();
|
player.Play();
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user