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...

public static final int EXIT_APP = 1;

class NewActivity extents Activity {
    private void doExitMethod() {
        setResult(EXIT_APP);
        finish();
    }
}

class MyParentActivity extents Activity {
    protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        if (resultCode == EXIT_APP) {
            finish();
        }
    }
}



On Thu, Jan 14, 2010 at 12:16 PM, Hannes H. <dub...@gmail.com> wrote:
> 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" <andjar...@gmail.com> ha
> scritto:
>
> 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 <seanhodge...@googlemail.com>
> wrote: > > The parent ...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to