Re: Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-14 Thread Kevin Duffey
Exactly... return the exit value and check for it in the main activity to exit or continue on. On Thu, Jan 14, 2010 at 4:51 AM, Sean Hodges wrote: > Ah, that makes things clearer. So you simply want to pass a signal > back to the caller Activity, rather than pass it by reference to the > callee?

Re: Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-14 Thread Sean Hodges
Ah, that makes things clearer. So you simply want to pass a signal back to the caller Activity, rather than pass it by reference to the callee? Well, seeing that you are already calling startActivityForResult() to launch NewActivity, you could just return an "exit" value back to the parent... pub

R: Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-14 Thread Hannes H.
Its more like that: if you are starting the application the first time, you have to enter some initial settings. If you don't want to do that there should be a button for exiting the app. Il giorno 14/gen/2010 05:08, "Kevin Duffey" ha scritto: So it sounds like you are putting up a dialog that o

Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread Kevin Duffey
So it sounds like you are putting up a dialog that offers the user to exit the application.. and from that you want to return the yes/no response back to the main activity.. if yes, quit, if no, continue? On Wed, Jan 13, 2010 at 12:06 PM, Sean Hodges wrote: > The parent activity may have been pau

Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread Hannes H.
On Wed, Jan 13, 2010 at 8:27 PM, Kevin Duffey wrote: > I agree with above... why? Is there a method you need in MainActivity to > call from NewActivity? Or is there a variable you need access to? > > On Wed, Jan 13, 2010 at 10:13 AM, TreKing wrote: >> >> Why do you want to do this? There's probab

Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread Sean Hodges
The parent activity may have been paused/destroyed by Android, once an activity is no longer in focus there is no guarantee that it will remain accessible until it is brought back to the foreground. You really need to pass all the information you need to NewActivity when launching it, or store the

Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread Kevin Duffey
I agree with above... why? Is there a method you need in MainActivity to call from NewActivity? Or is there a variable you need access to? On Wed, Jan 13, 2010 at 10:13 AM, TreKing wrote: > Why do you want to do this? There's probably a better way to go about it. > > > --

Re: [android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread TreKing
Why do you want to do this? There's probably a better way to go about it. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking On Sun

[android-beginners] How to get a reference of the "parent" Activity

2010-01-13 Thread Hannes H.
Hey folks, If I'm starting the "NewActivity" with startActivityForResult(): Is it possible to get in NewActivity a reference of that Activity, where I had started NewActicity? For example: In MainActivity I am starting NewActicity. How to get an reference of MainActivity in NewActivity? Thx for