I need execute a long running task on my android application (network activity). I use a new thread to do it. This is working fine.
The problem is I need to update my sqlite database with the results of this process and I must not let the user do any UI interaction while I am doing this update.
I was thinking in use a ProgressDialog to force the user to wait. But what context to use on the creation of this ProgressDialog ? The problem is I do not know what activity the user is using now. So I need some way of block the user interface who works in a global way.