How to tell main thread to execute a statement when a boolean becomes true in another thread? I was guessing wait and notify could be of use here but then i need to synchronise on something. Then i tried join method but it immediately stops my main thread and the UI stops taking any user presses on android
Indeed, wait and notify could do the trick, as well as locking functionality of java.util.concurrent package. And you could synchronize on any object you like - it only should be visible to both threads. For example:
moose poop looks like football shaped elk poop. About the size of this tiny ad:
a bit of art, as a gift, the permaculture playing cards