c# - 如何每天像(1PM,2Pm,3Pm,4Pm,5Pm)每天5次调用AVplayer?
问题描述
我想每天在 xamarin.ios 中播放 AVplayer 5 次,例如(1PM、2Pm、3Pm、4Pm、5Pm)。我在通知期间尝试了 5 次。但是通知方法不能播放avplayer ...请帮助我如何在给定时间播放avplayer 5次?
解决方案
你能告诉我当手机被锁定时,在本地通知期间会触发哪种方法
当您的应用程序终止时,您可以尝试:
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
UILocalNotification localNotif = launchOptions.ObjectForKey(UIApplication.LaunchOptionsLocalNotificationKey) as UILocalNotification;
if (localNotif != null)
{
//check if it is your local notification
//localNotif.UserInfo;
//Try add your method here
}
return true;
}
如果您的应用在后台,您可以尝试在此处添加方法:
public override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification)
{
base.ReceivedLocalNotification(application, notification);
//Add your method here
}
推荐阅读
- vba - 如何自动加载 EDITABLE PowerPoint Personal VBA Macros 文件?
- python - Python3.7 缺少 pip 包
- c++ - -if 和 -of 命令行参数
- css - 需要最少的媒体查询
- windows - 为什么postgres数据库会自动删除?
- python - 我已经在客户端录制了音频,但是尝试在 Django 视图中使用 librosa 加载时出现未知格式错误
- gmail - 是否可以通过 Gmail API 启用或禁用 Gmail 的对话视图?
- java - 将模型与数据预处理步骤集成
- azure - Azure 函数 - System.Net.Sockets.SocketException
- python - 如何在 discord.py 中使用 on_raw_reaction_add?