localnotification

How to navigate to a particular page when user taps on a Local Notification in Xamarin Forms app?

孤街浪徒 提交于 2019-12-24 14:39:31
问题 Hi am developing a Xamarin Forms app. i have implemented local notifications in the app. When the notification has fired, upon clicking the notification it has to navigate to a particular page. In iOS project in Appdelegate.cs i wrote this method public async override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification) which will fire when the user taps on the notification. here i need to navigate to a page. Here i wrote the below line of code App

How to change android local notification icon in ionic?

断了今生、忘了曾经 提交于 2019-12-23 10:58:39
问题 I'm using ionic to build an android app. I'm using $cordovaLocalNotification for local notifications. The notification works but it shows a default bell icon. How can I customize the notification icon? 回答1: $scope.scheduleSingleNotification = function () { $cordovaLocalNotification.schedule({ id: 1, title: 'GRM APP Builder', text: 'Quer café?!?', badge: 1, icon: 'res://coffee.png', data: { customProperty: 'custom value 1' } }).then(function (result) { console.log('Notification 1 triggered');

How to handle UNNotificationAction when app is closed?

放肆的年华 提交于 2019-12-22 06:53:45
问题 How to handle new iOS10 Notification Action when app is closed (not in background) ? when app is minimalized everything works fine with: UNUserNotificationCenter.current().delegate = x and handling it in class x: UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) { } } but nothing is called when app is closed and user tap action in

scheduled local notification is not being stored in the scheduledLocalNotification array

不问归期 提交于 2019-12-20 03:23:34
问题 I am currently scheduling local notifications to appear once per day at 6PM if a user has not already opened the app that day. If the user has already loaded the application, then I want to cancel the notification for that day and schedule a new one for tomorrow at 6PM. The notification displays properly, however, when I try to iterate of the list of scheduled notifications (this is not the only local notification I have in the application), the [[UIApplication sharedApplication]

Register for Local Notification

a 夏天 提交于 2019-12-20 03:16:57
问题 I am developing an IOS application with phonegap and need to set local notification for it which will repeat on every friday and specified time Also there is requirement that user will decide to receive or not the local notification 回答1: I recommend you read the following article on the topic which i found very helpful http://useyourloaf.com/blog/2010/7/31/adding-local-notifications-with-ios-4.html - (void)scheduleNotification { [[UIApplication sharedApplication] cancelAllLocalNotifications];

Know if iOS notification was dismiss

时光总嘲笑我的痴心妄想 提交于 2019-12-20 02:31:41
问题 Is there any way to know if a local notification was dismiss from the Notification Center (for example by pressing the x button)? Is it possible to get a list of all the notifications currently visible in the Notification Center? 回答1: No it's not possible to get list of notifications from any of APIs from Apple. And no there is no feedback from ignored / closed notifications. If you want to implement logic like that, I would propose to build this type of logic based on your own servers. When

How can I implement Apple's “Snooze” functionality in their Clock app?

£可爱£侵袭症+ 提交于 2019-12-18 13:32:01
问题 I'm diving into iOS development and am building my own alarm clock app to become familiar with the platform and SDK. One of the API's I'm currently learning is the Local Notifications API, which I assume is the same API Apple uses to implement their alarms in their Clock app. What I don't understand is how they implement their "Snooze" functionality. As I understand it, Local Notifications allow you to present to the user an alert box that has at most two buttons when your app isn't running

Swift notification fire from datePicker

半世苍凉 提交于 2019-12-14 03:42:12
问题 i want set as local notification fireDate the date of my datePicker. I found that code from another answer at S.O.: @IBOutlet var myDatePicker: UIDatePicker! @IBOutlet var mySwitch: UISwitch! var localNotification = UILocalNotification() // You just need one var notificationsCounter = 0 // put your functions now func datePicker() { myDatePicker.datePickerMode = UIDatePickerMode.Time } func notificationsOptions() { localNotification.timeZone = NSTimeZone.localTimeZone() localNotification

Local notifications - repeat Interval in swift 3

无人久伴 提交于 2019-12-14 02:25:30
问题 I want to repeat local notification every week, before iOS10 there is repeatInterval , but i am not able to find anything suitable to repeat notifications in iOS10. TimeTrigger and calendarTrigger both have repeat as true or false, where can i apply repeat as weekly, daily, monthly. Thanks. 回答1: Try this. func scheduleNotification(at date: Date, body: String) { let triggerWeekly = Calendar.current.dateComponents([.weekday,hour,.minute,.second,], from: date) let trigger =

UILocalNotification issue with iOS9

隐身守侯 提交于 2019-12-13 11:59:00
问题 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;