There is a task: after executing a certain method in the main thread, start waiting for 10 seconds, and then start the second method, again in the main thread. In this case, the wait should take place not in the main thread (at least, not block it).
The only option that I came up with: at the end of the first method to start the second thread, which after 10 seconds wait - wait(10000) , will call the method in the main thread. But here is the nuance: how to call the method in the main thread from ... not the main one?)
Yes, and I am very much tormented by doubts: is there a standard wait function in Java that I’m waiting to wait for a while, and after that time, it just calls the listener?
How can you accomplish the task (can you somehow run the method in the main thread from the second or does Java have a wait function)?
Looperin android), and already in it from the queue to take commands and execute. - zRrr