When a thread is alive, how can I stop the thread? I have given like
if(thread.isAlive()){
thread.stop();
}
but the method stop is deprecated and is throwing an exception
01-21 14:12:40.188: ERROR/global(535): Deprecated Thread methods are not supported.
01-21 14:12:40.188: ERROR/global(535): java.lang.UnsupportedOperationException
01-21 14:12:40.188: ERROR/global(535): at java.lang.VMThread.stop(VMThread.java:85)
01-21 14:12:40.188: ERROR/global(535): at java.lang.Thread.stop(Thread.java:1379)
01-21 14:12:40.188: ERROR/global(535): at java.lang.Thread.stop(Thread.java:1344)
How can we solve this?