1

I just want to set the timer for the recorded voice. So, that it comes like an alarm after that time.(just like notifications). Is that possible.. Any help will be greatly appreciated...

Thanks in Advance

Joker
  • 734
  • 3
  • 11
  • 27

2 Answers2

3

You might want to look at local notifications and NSTimer. Note that NSTimer doesn't work when the app is in the background.

Here is an example with NSTimer:

- (void)bar {
  [NSTimer scheduledTimerWithTimeInterval:200.0f
                                  target:self
                                selector:@selector(foo:)
                                userInfo:nil
                                 repeats:YES];
}

- (void)foo:(NSTimer *)timer {
  // Show alert or play recorded sound…
}

I'm afraid you can't play the recorded sound with local notifications, only when the app is in the foreground.

daknok
  • 56
  • 1
3

Try reading NSTimer Class in developer documentation or you can refer this link

Community
  • 1
  • 1
Amit Singh
  • 8,383
  • 4
  • 28
  • 31