草庐IT

localnotification

全部标签

iOS UILocalNotification 设置为每天触发一次,每两天触发一次,并且仅在星期日触发

我正在尝试使用设置包来安排UILocalNotification。在设置中,您可以选择是否希望每天收到通知(1次/天)、每2天1次、仅在星期日或从不。这是我使用的代码(全部在AppDelegate.m中):-(void)defaultsChanged:(NSNotification*)notification{[[UIApplicationsharedApplication]cancelAllLocalNotifications];[[NSUserDefaultsstandardUserDefaults]synchronize];NSString*testValue=[[NSUserD

iphone - UILocalNotification 自定义声音不在 iOS7 中播放

我在应用程序中使用UILocalNotification。在应用程序中有两种有条件地播放的声音-我已经为它们应用了适当的条件。但是当我安装应用程序并在iOS7设备上运行它时,它会触发本地通知,但应用程序中没有播放声音。下面给出了设置通知的代码:UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[pickerViewdate];localNotification.timeZone

iphone - UILocalNotification 自定义声音不在 iOS7 中播放

我在应用程序中使用UILocalNotification。在应用程序中有两种有条件地播放的声音-我已经为它们应用了适当的条件。但是当我安装应用程序并在iOS7设备上运行它时,它会触发本地通知,但应用程序中没有播放声音。下面给出了设置通知的代码:UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[pickerViewdate];localNotification.timeZone

flutter - 本地通知抖动

谁能告诉我如何使用本地通知插件在flutter中安排通知的代码。尝试了gitrepositorybuy中的示例,它对我不起作用,虽然正常通知有效但我如何安排它在特定时间提醒? 最佳答案 来自pluginsamplecode如果你想安排一个通知,你必须使用这样的代码:///Schedulesanotificationthatspecifiesadifferenticon,soundandvibrationpatternFuture_scheduleNotification()async{varscheduledNotification

flutter - 本地通知抖动

谁能告诉我如何使用本地通知插件在flutter中安排通知的代码。尝试了gitrepositorybuy中的示例,它对我不起作用,虽然正常通知有效但我如何安排它在特定时间提醒? 最佳答案 来自pluginsamplecode如果你想安排一个通知,你必须使用这样的代码:///Schedulesanotificationthatspecifiesadifferenticon,soundandvibrationpatternFuture_scheduleNotification()async{varscheduledNotification

ios - 应用程序终止后发送本地通知

我正在iOS中制作一个应用程序,它将在计时器上发送本地通知。当应用程序处于后台状态时它工作正常,但当它被终止并完全关闭时不起作用。发生这种情况时是否仍然发送本地通知?提前致谢。 最佳答案 当然有可能,如果您安排本地通知,即使您终止应用程序,它也会触发。UILocalNotification*_localNotification=[[UILocalNotificationalloc]init];_localNotification.fireDate=[NSDatedateWithTimeIntervalSinceNow:_value]

ios - 应用程序终止后发送本地通知

我正在iOS中制作一个应用程序,它将在计时器上发送本地通知。当应用程序处于后台状态时它工作正常,但当它被终止并完全关闭时不起作用。发生这种情况时是否仍然发送本地通知?提前致谢。 最佳答案 当然有可能,如果您安排本地通知,即使您终止应用程序,它也会触发。UILocalNotification*_localNotification=[[UILocalNotificationalloc]init];_localNotification.fireDate=[NSDatedateWithTimeIntervalSinceNow:_value]

ios - 如何通过快速按下按钮取消 localNotification?

我正在通过单击按钮安排基于位置的UILocalNotification。但是当我尝试通过再次单击同一个按钮来取消localNotification时,它不会取消通知。我正在使用UIApplication.sharedApplication().cancelLocalNotification(localNotification)取消我预定的基于位置的本地通知。我究竟做错了什么?这是我的实现@IBActionfuncsetNotification(sender:UIButton!){ifsender.tag==999{sender.setImage(UIImage(named:"Notif

ios - 如何通过快速按下按钮取消 localNotification?

我正在通过单击按钮安排基于位置的UILocalNotification。但是当我尝试通过再次单击同一个按钮来取消localNotification时,它不会取消通知。我正在使用UIApplication.sharedApplication().cancelLocalNotification(localNotification)取消我预定的基于位置的本地通知。我究竟做错了什么?这是我的实现@IBActionfuncsetNotification(sender:UIButton!){ifsender.tag==999{sender.setImage(UIImage(named:"Notif

objective-c - 向 LocalNotifications 发出振动和声音

我如何为LocalNotifaction添加振动和声音代码:UILocalNotification*notification=[[UILocalNotificationalloc]init];NSDate*firedate=settime.date;[notificationsetFireDate:firedate];[notificationsetAlertBody:@"הלכהיומית"];[notificationsetAlertAction:@"הלכה"];[[UIApplicationsharedApplication]scheduleLocalNotification: