localnotification

how to implement multiple local notification not a single notification for swift 3

北战南征 提交于 2019-12-04 04:30:53
i have use the single notification , and this is my code: this is for register the local notification>>> func registerLocal() { let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in if granted { print("Yay!") } else { print("D'oh") } } } and this function to schedule the local notification>>> func scheduleLocal() { registerCategories() let center = UNUserNotificationCenter.current() // not required, but useful for testing! center.removeAllPendingNotificationRequests() let content = UNMutableNotificationContent()

UILocalNotification issue with iOS9

别来无恙 提交于 2019-12-04 03:13:42
Since iOS9, local notification aren't working properly. Sometimes users receive the notification, sometimes they just don't. My notifications are repeated daily. Any idea what might causing the issue? I saw some posts, that there's a bug in iOS9, but I'm not sure that's the reason. Here's a piece of code: NSDate *alarmDate = [date dateByAddingTimeInterval:DEFAULT_SNOOZE_DURATION * i]; UILocalNotification *localNotif = [[UILocalNotification alloc] init]; localNotif.fireDate = alarmDate; localNotif.timeZone = nil; localNotif.alertBody = alertBody; localNotif.hasAction = YES; localNotif

Local Notification in Phonegap [closed]

夙愿已清 提交于 2019-12-03 09:45:14
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I want to have a local notification in my iOS Phonegap app. I followed lots of tutorials and code but no help. Can anyone please guide me. 来源: https://stackoverflow.com/questions/8910119/local-notification-in-phonegap

Repeat UILocalNotification on Specific day

こ雲淡風輕ζ 提交于 2019-12-03 08:44:28
问题 I need to set UILocalNotification, I just need to take hour and minute from DatePicker and need to set specific date ( like : Monday ) and repeat it on every Monday. I have two question about it : First one ; is it possible to show only "day names" like "Sunday" on the date section of date picker? Second question is ; what is the correct codes if i want to set specific date for local notification ? Thank you for the answers and here is my code below ; -(IBAction) alarmButton:(id)sender {

iOS UILocalNotification - No delegate methods triggered when app is running in background and the icon is clicked upon notification

非 Y 不嫁゛ 提交于 2019-12-03 05:06:36
问题 iPhone version - 5.1 (9B176) Below is the series of events during Local Notification where in which didFinishLaunchingWithOptions method is not invoked. App is running in background. Got local notification - simple notification no dialog. Click on the app icon which shows the badge number. Expected as per Apple documentation: As a result of the presented notification, the user taps the action button of the alert or taps (or clicks) the application icon. If the action button is tapped (on a

Repeat UILocalNotification on Specific day

前提是你 提交于 2019-12-02 21:18:14
I need to set UILocalNotification, I just need to take hour and minute from DatePicker and need to set specific date ( like : Monday ) and repeat it on every Monday. I have two question about it : First one ; is it possible to show only "day names" like "Sunday" on the date section of date picker? Second question is ; what is the correct codes if i want to set specific date for local notification ? Thank you for the answers and here is my code below ; -(IBAction) alarmButton:(id)sender { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; dateFormatter.timeZone = [NSTimeZone

how to set local notification for every two weeks

北战南征 提交于 2019-12-02 16:29:11
问题 How to trigger local notification for every two weeks? What i did was: UILocalNotification *localNotification = UILocalNotification.new; localNotification.repeatInterval = 14; localNotification.fireDate = [NSDate dateWithTimeInterval:10 sinceDate:notificationDate]; localNotification.alertBody = notificationMessage; localNotification.alertAction = @"Open"; localNotification.category = @"default_category"; [[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; 回答1: Try

How i can send notifications when my app is closed in Ionic?

假装没事ソ 提交于 2019-12-02 15:34:44
问题 I'm using Ionic for mobile dev, i'm actually using LocalNotifications Every 5 minutes i check in my server if have new question: this.checkQuestions(); this.IntervalId = setInterval(() => { this.checkQuestions(); }, 300000); My function checkQuestions() make a for() with the data of my server: for (var i = 0; i < res.data.notificar.questions.length; i++) { this.localNotifications.schedule({ id: i, priority: 2, text: 'Produto: ' + res.data.notificar.questions[i].produto.substring(0, 20) + '...

UILocalNotification Repeat

 ̄綄美尐妖づ 提交于 2019-12-02 12:56:10
问题 I want repeat on the Every Sunday and Monday How can I achieve this? 回答1: Try setting 2 notifications, one with a Sunday fireDate and the other with a Monday fireDate and set both repeatIntervals to NSWeekCalendarUnit 来源: https://stackoverflow.com/questions/3581641/uilocalnotification-repeat