best method for background uploader in Android
<p>Problem:</p>

<p>I want to write a process that will allow a user to take photos with the device and for those photos to then be uploaded to some listener in the cloud.  The user should not have to do anything to initiate the upload, a background listener would just watch the folder and as long as it finds files in it it would upload them and delete them.</p>

<p>Two problems:
1) how to keep the program running in the background even after the user is no longer taking pictures (and if they reboot the device for it to wake up and finish the uploads, if any remain)</p>

<p>2) assuming the connection is spotty (as it always is) how to verify that a given image has completed its upload, and if not, to resubmit it. </p>

<p>I don't need any code examples, I just would like opinions on the best strategy to get this implemented. </p>

<p>I was going to use Apache commons and just do an upload to a PHP, but am not sure what sort of error checking exists to take into account a connection drop mid file. </p>

<p>TIA.</p>
