On Mon, Aug 30, 2010 at 3:15 AM, pramod.deore <[email protected]> wrote:
>  But instead of terminating the process what I want is : If user press
> back button then also data is sent to server in background and after
> successfully sending set screen or alertbox to the user showing status
> of data i.e successfully saved on server or not.

Step #1: Use an IntentService instead of a thread

Step #2: When the IntentService is done with the upload, it uses an
ordered broadcast to either update the on-screen activity or put a
Notification in the status bar

http://commonsware.com/blog/2010/08/11/activity-notification-ordered-broadcast.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to