In your application's onPause/onStop/onDestroy simply use
Handle.removeCallbacks(Runnable).

On Tue, Feb 17, 2009 at 9:46 PM, Dilli <[email protected]> wrote:
>
> Hi all,
>
>
> I am developing a simple application with thread concept
>
> problem:
>
>  In one thread i write
>
>         {
>           Thread.sleep(10000)  //10 sec sleep
>           m_handler.post(my_runnable);  // to post to run another
> runnable
>         }
>
>
>  before  the thread wake up ( <10 sec)  i stopped my application
> exiting my application
>
>  but the thread sleeped not killed and it wakes up after 10 sec and
> try to post message
>  and it causes exception.
>
>
>  is there any way to kill the threads those are in sleep mode while
> exiting the application ??
>
>  and prevent to post using m_handler.
>
>  Need suggetions
>
> Thank You..
>
> Dilli.
>
>
>
>
>
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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