Friday, 15 July 2011

android - Waiting till the async task finish its work -



android - Waiting till the async task finish its work -

i'm new programming , have doubts.

i have asynctask phone call runinbackground.

and start process like:

new runinbackground().execute();

but wish wait until phone call finish executing, before proceeding other statements of code.

how can that?

are there way it?

wait until phone call finish executing

u need phone call asynctask.get() method getting result , create wait until doinbackground execution not complete. this freeze main ui thread if not phone call method within thread. result in ui thread start asynctask :

string str_result= new runinbackground().execute().get();

android

No comments:

Post a Comment