Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oo7ml

macrumors 6502
Original poster
Jan 20, 2010
259
0
Hi,

I am building an app at the moment, that allows a user to take a photo or video which is then automatically uploaded as a pin on a map.

I don't want the user to see and wait for a 'Uploading...' icon when they take a video and upload it, as it will make the app feel and look very slow and sluggish.

Can anyone advise on what approach i could take that would allow the app to feel responsive and fast, while the photo / video uploads?

Should i store the photo locally, upload it in the background... if so should i delete it from local storage as soon as it has finished uploading in the background so that when the user clicks on it, they are clicking on the database version, and not the local version?
 
Can anyone advise on what approach i could take that would allow the app to feel responsive and fast, while the photo / video uploads?

Should i store the photo locally, upload it in the background...

Yes, that would be my recommendation.

...if so should i delete it from local storage as soon as it has finished uploading in the background so that when the user clicks on it, they are clicking on the database version, and not the local version?

I say no. Why require the app to download a resource, possibly via a slow connection, when you already have a local version of it? (Which is what downloading it does: provides you with a local copy.) Only download resources for which you have no local version (or for which the local version is no longer as up-to-date).
 
The iPhone camera has pretty good resolution. Is it possible for you to downsize the images that you upload? Can increasing the JPEG compression leave you with an image that looks good enough?

All you need right away to make the map look responsive is a small thumbnail over your pins. You could create that small thumbnail on your client and upload that before you kick off your video upload. Maybe you could display a small progress bar over the thumbnail to indicate that a concurrent upload is still in flight.

Uploading in the background is the way to go for timed media. I agree with Dejo. Look up NSURLSession background transfers for more on this topic.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.