我正在为iOS和Android创建 Xamarin表单应用程序,到目前为止,我已在 PCL 中实施了本地通知,我可以安排通知,问题是,当我点击通知时,它会在应用程序的后台或主页面中显示应用程序,但是当用户通过点击通知进入时,我必须加载特定的屏幕。 PS我使用 Plugin.Notification 进行crossPlatform本地通知
TimeSpan _time = new TimeSpan(14, 43, 0);
TimeSpan _time2 = new TimeSpan(14, 46, 0);
DateTime date1 = date.Date + _time;
DateTime date2 = date.Date + _time2;
var _ = this.ScheduleNotification(1, date1);
var __ = this.ScheduleNotification(4, date2);
public async Task<bool> ScheduleNotification(int id,DateTime time)
{
Notification lLocalNoti = new Notification()
{
Id= id,
Title = "DEMO APP",
Message = $"welcome {id}",
Vibrate = true,
Date = time,
};
await CrossNotifications.Current.SetBadge(1);
await CrossNotifications.Current.Send(lLocalNoti);
任何示例项目,教程,建议都会感激不尽