Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Snooze local Notification

I am working on an alarm application and I am using local notification for that. Now I want to add snooze functionality to my alarm. I searched on Google and found that iPhone doesn't support such functionality.

But is there another way to do this?

like image 948
Yogi Avatar asked Jun 01 '11 07:06

Yogi


People also ask

What does snooze notifications mean?

Postpone emails and temporarily remove them from your inbox until you need them. Your email will come back to the top of your inbox when you want it to, whether that's tomorrow, next week, or this evening. You can find your snoozed items under Snoozed in the Menu .

Do local notifications work when app is closed?

Current Behavior. A local notification is schedule at a given time. The notification only happens if the app is open or in the foreground. If the app is closed the notification does not happen (no notification card).

Can you snooze app notifications?

To snooze a notification, drag it slightly left or right, and then tap Snooze . To pick a time, tap the Down arrow . To expand a notification, tap the Down arrow . Then, to act directly from a notification, tap an action, like Reply or Archive.


2 Answers

AFAIK you can't add a custom behaviour when the notification windows pops up. BUT... You can try it like this: after the user has clicked "View" and the app is launched by an UILocalNotification, you could open a modal view with a huge button "Snooze" and another (smaller) one "Open". And if the user taps "Snooze" you just schedule another local notification and close the app.

What about that?


PS: A couple of days ago I've worked the first time with these local notifications. I had to design a class which can be used universally. A method for implementing snooze would be cool! I'll write you again, if I get a better solution. But please tell me (and other) in this forum, If you have found a good solution.

like image 107
Sedat Kilinc Avatar answered Sep 28 '22 09:09

Sedat Kilinc


Read This articles:

  1. About Local Notifications and Push Notifications
  2. Local Notification Sample Code (OS 4.0 only)
  3. Repeating an iOS local notification
  4. Local Notifications
  5. iPhone Tutorial: Scheduling Local Notifications using a Singleton class

I think you can user Local Notifications for your alarm application ...

like image 29
Viktor Apoyan Avatar answered Sep 28 '22 08:09

Viktor Apoyan