I'm trying to write a service that starts an activity and then does something with data the activity receives from the user. I want to wait for the activity to signal it has gotten the data from the user but when I do any sort of waiting within the function that starts the activity, the activity doesn't start. The following is just sample code to help show what I want:
public void foo() { Thread t = new Thread() { public void run() { startActivity(intent); while(activityNotdone){} } } t.start(); t.join(); bar(); } Doing this, the activity will never start. If I remove the while call, the activity will start, but then bar runs before the activity has gotten a response from the user. Any suggestions? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---