Ok it works but I need to have Activity and no Dialog for continue my
programm.
I would like to use thread to force waiting but I don't know if it is
possible and how to do that.

What do you think about it?

Cécilia

On May 20, 4:37 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote:
> As far as i know, you can't do this.
>
> Maybe you want to implement a modal dialog.
> Launch a (subclass of) android.app.Dialog instead.
> However, even when using dialogs by calling yourDialog.show(), the show
> () call returns immediately. It doesn't wait.
>
> It looks like you have to re-write some of your code to handle the
> onActivityResults instead of the returned value of myFunction.
>
> On May 20, 5:30 am, "danielececil...@gmail.com"
>
> <danielececil...@gmail.com> wrote:
> > Hi,
>
> > I have a problem with return value of a method witch launches an
> > Activty.
> > I would like a method witch launches an Activty and witch wait for
> > this Activity being complete before returning a value.
> > I note that , doing nothing special, the calling method achieves its
> > own code before launches the Activity.
> > How can i do to have a method witch waits for the activity finishes?
>
> > My code is the following :
>
> > -------------------------------------------------------- Begin Code
> > ------------------------------------------------------------
> > String result;    //class field
>
> > public String myFunction (RootActivity rootAct,
> >                  final String title,
> >                  final ArrayList<String> label,
> >                  ArrayList<Integer> max)
> >   {
> >    root = rootAct;  // The activity witch launches another activity
>
> >    action = SecondActivity.class;
>
> >    Intent i = new Intent(root, action );
>
> >    root.startActivityForResult(i, 0);
>
> >   //The root activity initializes 'result' with result of
> > SecondActivity in onActivityResult method
> >   // return s;
> >   }
>
> > -----------------------------------------------------------End
> > Code---------------------------------------------------------------------
>
> > Some help please :-)
>
> > Cecilia
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to