I work for local notification and all I have built fully functional
And follows that when launches my notification
Message shows the 2 buttons
If the press on “viwe” button => it’s the launches application
And if the press on “close” button of the second, he’s working close
I want to, “if the user does not first and not the second
Any after 30 seconds ”
=> (after 30 seconds – After the end of a voice alert “29.mp3”) but I did not press if the user does not first and not the second
Any after 30 seconds
That shows a specific sound (after 30 seconds), how can I do this
and what deligate method do that functionality
-(IBAction) scheduleNotification1 {
local1 = [[UILocalNotification alloc] init];
// create date/time information
local1.fireDate = [NSDate dateWithTimeIntervalSinceNow:2];
local1.timeZone = [NSTimeZone defaultTimeZone];
// set notification details
local1.alertBody = @"2!";
local1.alertAction = @"View";
//local1.soundName = UILocalNotificationDefaultSoundName;
//local1.soundName = @"alarmsound.caf";
local1.soundName = @"29.mp3";
// set the badge on the app icon
local1.applicationIconBadgeNumber = 1;
// local1.repeatInterval =NSSecondCalendarUnit;//// NSMinuteCalendarUnit;
//local1.repeatInterval =1 ;
// Gather any custom data you need to save with the notification
NSDictionary *customInfo = [NSDictionary dictionaryWithObject:@"ABCD2" forKey:@"yourKey1"];
local1.userInfo = customInfo;
// Schedule it!
[[UIApplication sharedApplication] scheduleLocalNotification:local1];
//[local1 release];
}
I think you will have to schedule a second notification 30 seconds after the first one, and cancel it if the user presses the view button. You can’t have a timer built in to the system notification alert.