views:

215

answers:

3

Hi all,

I am planning to develop a iphone client application to upload images from iphone gallery to amazon s3 using rest calls.so is there any library to run this application as a background process in iphone.

Also is there any library to access the iphone photo gallery(Should be able access all the images,not only selected one like in UIImagePickerController)

Thanks in advance for stack overflow masters for sharing their knowledge.....

+1  A: 

As far as i know, new iPhone OS4 supports multitasks without interruption, i dont remember exactly but this feature should be available in 4G and 3GS versions. so you can use this new feature to achieve what you want i think.

Deniz Acay
A: 

Background process is an iOS 4 feature. Download and read the the latest (2010-06-04) iPhoneAppProgrammingGuide.pdf from developer.apple.com. iOS 4 programming related information is still under NDA at the moment, so we cannot discuss much here.

ohho
Thanks for your response
Fedrick
+2  A: 

Parts of iOS 4 have been discussed by Steve already at the unveiling a few months back, so some details should be free to talk about.

I think you are asking one of two things: can you initiate the upload of pics from an app and then switch to another app while the upload completes in the background or can you automatically upload any new pictures taken at certain intervals.

You can do the former, because iOS 4 gives you a certain amount of time for task completition after you exit an app. There's not a lot of time, however. See the Apple developer site for how long you have specifically.

The latter isn't really possible yet. Periodic events can only be triggered under certain conditions. These are things like location changes, VOIP or the audio buffer running out of data to play (Pandora in the background would use the latter). You can't just have an arbitrary process constantly run in the background actively and monitor your photo album, or even check in every fixed interval and look for an update. If you want to accomplish this, you might be better off writing your own camera app and then automatically uploading all the pics before copying them to the system photo album.

I don't know about accessing the photo album in bulk, but my guess would be Apple doesn't offer that, so an app can't covertly access your pics without you knowing about it.

Joost Schuur
Re: "There's not a lot of time, however." In the GM, the timeout for background processing moved from 5 to 10 minutes. That ought to be an ample plenty for uploading an image.
Dan Ray
Thanks for your response, i am actually looking for task completion like features,if possible can u please tell me what is the max time limit for task completion
Fedrick
ok thanks for your information ,so 10 mins is the max task completion time limit for whole background process.
Fedrick
Is the API reference for task completion feature available now
Fedrick
I'm not sure linking to specific docs that are under NDA is kosher, but log into the $99 iPhone developer account on the Apple developer site, head over to the 4.0 SDK section and explore the 'Supporting Multitasking In Your Applications' doc linked on that page.
Joost Schuur