1

Overview

  • In my iOS project, I am using UILocalNotification,
  • when a notification is fired, a custom sound is played.
  • the custom sound plays for about 20 seconds,
  • the phone vibrates only once at the start

What I want to do:

  • Presently the phone vibrates only once at the start. I want it to vibrate repeatedly for 20 seconds just like in Apple's alarm / Timer app before the user pressed on the action button ?

Question

  • During the alert is it possible to make the phone to vibrate for the 20 seconds before the user can attends to the notification or clicks on the action button ?

Problem

  • Since my app doesn't have any control till the user presses on the action button I am not sure how I can make it vibrate
  • The app might be closed when the notification is pops

Is there a way to do this ?

user1046037
  • 16,755
  • 12
  • 92
  • 138

1 Answers1

0

Schedule a timer that invokes the vibration function several times with some delay between calls. Don't forget to add an option to disable the vibration, cause you might get your app rejected from the app store because of this.

Alexander
  • 8,117
  • 1
  • 35
  • 46
  • thanks for the reply, I have a doubt, the app is supposed to serve as an alarm, so how can i run a timer because might not even be running when the notification is fired. – user1046037 Mar 28 '12 at 09:04