When and how to exit file uploader service
<ol>
<li><p>I have a class that implements fileuploader service. Activites bind to it and supply it a list of files to be uploaded, and then unbind immediately. The files are then uploaded one-by-one by the service in a background thread(asynctask).</p></li>
<li><p>I start this service in my dashboard actvity using startService(), so that it keeps running until specifically stopService() is called.</p></li>
<li><p>Now, my question is when do I stop this service?</p></li>
</ol>

<p>Basically I need to check two conditions: 1: all files are uploaded; 2: app has exited.
Also, to exit the App, user has to press back button on dashboard activity.</p>

<p>I could have overrided back button press and queriesd the service whether any files are left, but I dont want to use that method.</p>

<p>Any suggestions?</p>
