Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Keep NSTimer running when app is in background (multitasking)
I hope there's an expert out there who can help me with this:
I googled up and down, but could not find any information if there is any way to keep a running NSTimer active when the app is running in the background (iOS 4)?
I hope there's an expert out there who can help me with this:
I googled up and down, but could not find any information if there is any way to keep a running NSTimer active when the app is running in the background (iOS 4)?
Thanks for any help!
Steve
I am having same problem and I've managed to setup UILocalNotification and it works fine. But, I get event fired once timer gets to zero (i.e., when current clock is equal to setup) instead of getting event, for instance, every second. Here is sample code:
yes i've understand, but if you play a "nosound" during the background you can keepup the timer:d
Ah, OK... now I understand. Worth to have a look at it, but as far as I can tell this might be a problem when you want to get the app authorized by Apple...
Ah, OK... now I understand. Worth to have a look at it, but as far as I can tell this might be a problem when you want to get the app authorized by Apple...
OK, I tried that, but it actually does not do what I was looking for. The silent sound is played properly every x seconds (I checked that by replacing it with an audible sound). But: once the app is set to background mode, the app starts to sleep and all running NSTimers, too. When I re-activate the app, I hear that all 'silent sounds' that should have been played while the app was in background mode, are played right one after the other. Also all other NSTimers continue to tick.
So, this does not help. It does not keep other timers ticking when in background. Too bad... :(
OK, I tried that, but it actually does not do what I was looking for. The silent sound is played properly every x seconds (I checked that by replacing it with an audible sound). But: once the app is set to background mode, the app starts to sleep and all running NSTimers, too. When I re-activate the app, I hear that all 'silent sounds' that should have been played while the app was in background mode, are played right one after the other. Also all other NSTimers continue to tick.
So, this does not help. It does not keep other timers ticking when in background. Too bad... :(
I also do not have significant progress ... Sorry.
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAnyway: does that mean that there's no direct way to keep an NSTimer running when in background?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomethis tutorial
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeSo, this does not help. It does not keep other timers ticking when in background. Too bad... :(
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome