I have a method that can take time to complete as it uses the internet to check something and depending on the internet speeds can take a while so I have placed it into its own thread but I'm wanting to know how I can notice when this thread is complete as I then need to update the screen from the Main thread.
New thread code looks like this:
Thread newThread = new Thread(){
@Override
public void run() {
//My thread code
};
newThread.start();
This is what the thread code looks like, not going to copy and paste all the code it uses as it would be pointless but I'm wanting something like when
newThread.iscomplete {
//More code
}
Something along those lines
Thanks