When my app is used for the first time i am performing some data setup etc that takes a "random" time to complete, whilst this is going on i'm showing a progress dialog to the user telling them whats going on and presenting a spinning wheel, this is all done via an async task as the many docs and guides say is the only way to go about using a progress dialog.

but my problem is i need everything else in my app to "wait" for the data setup to be finished before it goes about its business but still keep the handy dialog telling the user whats going on, im struggling to find how to go about this.

if anyone has any ideas that be great.