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
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.
Try reading NSTimer Class in developer documentation or you can refer this link