I have a litle problem in my Android project.
I would like to do something every 1 second but the problem is that I have something else to do between those 1sec.
I tried to make a while (true) loop with wait(1000) inside but the problem is that this loop blocks all other instructions.
What would be a workaround / solution for this?
I would consider a threading scenario. In case you are working with UI updates, you can use
postDelayedso you can update your UI from withing the Runable. You can call the Runable from within a Runable, too.Edit: Based on your comment, this is how you can implement calling back your function repeatedly.