Wait for an Activity to Complete in a Service

Put your problem here if it does not fit any of the other categories.

Wait for an Activity to Complete in a Service

Postby ranjit0046 » Sun Jan 24, 2010 9:26 am

Hi All:

Currently, I am in a background service which needs to start an activity ( alert dialog) and wait till the user click's OK or Cancel. I am creating a new Intent with my Alert Box activity and start it using the startActivity method.

I see that, the activity gets triggered only the execution flow of Service is complete. I get the Alert Dialog box after the service complete's its execution.

Can anyone help me to how to wait and retrieve the user input from the started activity. Please note that this works when I start the activity from another activity.

I am having problems waiting, when I have to start and wait from a non-activity class (e.g. service)

Thanks in Advance..

Posts: 47
Joined: Mon Dec 14, 2009 12:46 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests