views:

57

answers:

1

Hi All, I'm a bit confused about multitasking. I have a timer app which I am updating for OS4. Previously you had to keep the app running for the timer to sound, I have now modified it using a LocalNotification so that is the user exits the app then they get an alert when the alarm fires. I've tested this on an iPhone 4 and all is good, it works as I expected.

I then tried it on an iPhone 3G with OS4 installed. Now I thought that multitasking wasn't supported but my alert still pops up if the user has exited the app. Does this mean that multitasking isn't supported but local notifications are? I don't really want this as it causes several problems. When I click view on the alert it just relaunches the app, it doesn't take you to the alarm screen. More importantly you can't cancel this alert and could potentially set up lots of notifications which would be annoying and confusing.

Can someone clarify that my thoughts are correct? Basically I guess I want to know how to get around this. Is there something I can do to check if multitasking is supported so I can only set the notification if it is?? A clue of what to search for would do...Thanks

+4  A: 

Multitasking and Local Notification are two different things.

Local notifications are supported on every device running iOS4.

In order to know if the device support multitasking or not you can use that

UIDevice* device = [UIDevice currentDevice];
backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
backgroundSupported = [device isMultitaskingSupported];
TheSquad