My application has two activities. Activity one(A1) starts the thread. Let's suppose this activity(A1) goes to pause-state. I want to stop the running thread safely; how to do this?
you can use return statement in your Threads run method like this ...
or you can use this ...
//use boolean flag in side run method of
now this is