Live data from Hacker News

IPhone multitasking and background updating

marco.org

1–10 of 35 posts

Re: IPhone multitasking and background updating

#3
Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too.

I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

Re: IPhone multitasking and background updating

#4
post #3

Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too. I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

There's real multitasking for Native apps (since 1.0) and a limited multitasking for 3rd party apps (since 4.0)

Edit: Downvoted? Am I wrong? Just curious

Re: IPhone multitasking and background updating

#5
post #3

Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too. I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

The items (audio, GPS, etc) on this page more-or-less each correspond to distinct "3rd party app multitasking APIs" in iOS 4: http://www.apple.com/iphone/features/multitasking.html

Developer documentation is, of course, better. But I think it's all under NDA.

Re: IPhone multitasking and background updating

#7
post #4
post #3

Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too. I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

There's real multitasking for Native apps (since 1.0) and a limited multitasking for 3rd party apps (since 4.0) Edit: Downvoted? Am I wrong? Just curious

don't know.. upvoted again ;)

I had the hope of little more technical detail, though

Re: IPhone multitasking and background updating

#8
post #6
post #2

What about Push? Can't anything be done with it? Like Mail.app

Push Notifications have a very small payload on iOS; besides, the app doesn't get "woken up" and allowed to run to process the payload until it's switched to.

Right. The best they can do is to respond to the push notifications when the user next runs their app. So Instapaper could present the possible downloads in a dialog, then when the user agrees, use Task Completion to download them in the background. This might be workable, and would often be very useful, though less convenient than a true background fetch.

Re: IPhone multitasking and background updating

#9
post #5
post #3

Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too. I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

The items (audio, GPS, etc) on this page more-or-less each correspond to distinct "3rd party app multitasking APIs" in iOS 4: http://www.apple.com/iphone/features/multitasking.html Developer documentation is, of course, better. But I think it's all under NDA.

I see, so noone can explain the details.. I thought they opened up the nda policy a bit.

Re: IPhone multitasking and background updating

#10
post #3

Can someone briefly explain how the "multitasking" works, then? I was under the impression that this will be possible, too. I suppose apps that are sent into the background are just frozen in their current state and continue to run where they left of, when going into foreground? Just a guess, though..

Starting with iOS4 developers have access to a set of APIs. Audio, GPS + 'Location', Push, Phone (think Skype), Worker and probably a few other APIs.

Until now, when the user pressed the home button you were able to write your state to flash if necessary. Now there is another way to 'freeze' your app and keep the state in memory -- at least until iOS4 decides your app won't be needed soon and fully quits it to free memory.

If you use the APIs mentioned above it is possible to continue playing (streaming) music, doing something else during a Skype call or update your location whenever you connect to a new cell tower* . If you need turn-by-turn you get access to constantly ask for GPS, this aside from calling/playing music is the only 'real' multitasking as it continues in the background until you tell it to quit.

The Worker API allows you to complete a task, for example continue uploading that video file to Dropbox. Once it's done the Dropbox app quits (or is frozen in memory as everything else).

Push notifications allow to access a server but it seems as someone else here mentioned the payload is too low, and only accessible as soon as the app is activated.

I can't tell for sure though as I'm not an iPhone developer just following it closely and most of this information comes from the January(?) keynote when iOS4 was introduced.

*Because GPS sucks battery you app gets called whenever you connect to a new cell tower, this according to Apple, should be sufficient for services like Google Latitude where the exact position at any given point isn't that important like it is for turn by turn navigation.

Post reply on HN