I've got separate thread that is running an infinite loop, which also updates the main ui thread via a handler (my thread > handler > ui thread).
Infinite loop on second thread:
while (true) {
Thread.sleep(100);
// do xyz
}
However I now would like to modify some objects within the thread VIA the main UI thread.
If I create an additional handler to work in the opposite direction (ui thread > handler > my thread) , I would need to run a looper and my infinite loop at the same time - how do I achieve this? Where do I call the releventlooper.loop()
?