1

I am trying to create an app that automatically uploads a picture to my server. The idea is that a user creates a picture with the native/normal camera and my app gets a notification (catches the event) and uploads the picture (in the background).

I found a solution for Windows Phone (see here) and Android, but not for iOS. How can I do this? - Is this technically even possible (with the given APIs) or is it a special feature just for contracted services (Facebook or Dropbox do that)?

Thank you!

Community
  • 1
  • 1
casaout
  • 1,819
  • 3
  • 24
  • 54

1 Answers1

2

From what I know, this should not be possible. If I'm not wrong, the Dropbox app does the sync when the app is open and never does it in the background; at least it will run in background for 10 minutes more after being "closed" and then will be cut off.

On iOS it's not possible to run such activities in background.

marzapower
  • 5,531
  • 7
  • 38
  • 76
  • Hi marzapower. Thanks for your feedback, what a pity... And if the app is running, can I get a list of all the recently taken pictures (from the official camera app) or does the user have to manually add/select them? Thank you!! [Edit]: I think, Dropbox can do this somehow: http://www.gadgetreview.com/2012/09/how-to-automatically-upload-photos-to-dropbox-from-your-iphone.html. Or do I understand something wrong? Is it probably a special feature which Apple only allows for Dropbox? Thank you. – casaout May 25 '13 at 09:17
  • You can get all the user's photo programmatically and upload them inside your app using AssetsFramework however, I don't think users will like an app that just uploads their photo to a random server without them pressing a button and the app doing it automatically. When you say "native/normal camera" do you mean the Photo app ? Because you can simply take a photo inside your own app and tell your app to send that photo after it has taken it. – Zhang May 25 '13 at 13:21
  • Yes, Dropbox will surely upload photos to sync them with your account, even without telling you. But the key information is that Dropbox will do this *only* when active. It will run in background just to complete an upload operation it started while in foreground. There is no mean to launch a background sync operation without opening your app, just listening to system broadcast messages. – marzapower May 25 '13 at 23:15
  • @Zhang & marzapower: Thanks for your answers. The app would be something like a picture backup for a very special use case... To summarize, it is not possible to automatically upload the pictures a user takes in the background. (With "the pictures" I mean all the pictures the user takes with the normal camera app (which is then displayed in his picture gallery). But what I could do is upload them as soon as he opens the app. Right? – casaout May 26 '13 at 07:43
  • 1
    Exactly. That's the only way. – marzapower May 26 '13 at 10:05
  • 1
    https://www.dropbox.com/en/help/500 Dropbox IS capable of uploading without the app ever being awake. – Alex Spencer Nov 08 '14 at 06:56