I want to stop a running thread, but Thread.stop is deprecated :/
Does anyone know a solution for this problem? The thread should only run
one time and than the thread stop.
Thanks
public class Updater implements Runnable {
Thread thread;
public Updater(){
thread = new Thread(this);
}
@Override
public void run(){
//Does anything
}
public void start(){
running = true;
this.thread.start();
}
public void stop(){
this.thread.stop(); //Error!!!
}
Code hier eingeben...
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/7ac927e0-55b3-45f0-bfdd-0ffb7688ff46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.