I wrote an application which has a flow in which there is a waiting for some server event to happen (waiting by polling till desired resault returned). it is natural that the wait time will be minutes. I would like that the application users will be able to run other applicatins, but once my applications thread got the desired server response, I want my application to return to the foreground.
How do I return my application to the forground (from a thread that my application created)?
I tried the common way of runOnUiThread, but it didn't work while my application is not on the foreground.
thanks.