Android: Issue working on background thread
<p>I am working on an application to sync contacts which are large in number.
The syncing takes place in a background thread with user being able to browse through the rest of the application. I am displaying the sync status in the notification bar suing the progress bar. </p>

<p>The problem I am facing is that there are instances when the activity is killed and hence the background thread used for syncing the contacts is purged.</p>

<p>Can this situation be avoided in any case? </p>
