But I cannot think of a situation where you would find this useful.
Even though you are able to send data from the sub-activity, your
parent activity cannot take any action, since it will be in paused
state.

Thanks and Regards,
Kumar Bibek


On May 6, 8:28 am, Aggiornamento <[email protected]> wrote:
> hi all,
>
> does anyone know how to get result from subactivity to MainActivity
> without close the subactivity?
>
> i know the usual way is using method called "startActivityForResult
> (Intent intent, int requestCode)"
> and inside the subActivity set the result 1st before finish(); method
>
> setResult(requestCode,intent);
> finish();
>
> then the function called "protected void onActivityResult(int
> requestCode, int resultCode, Intent data)" which is inside main
> activity will get the result.
>
> BUT...
>
> by using that way, it will close my sub activity and the system will
> go back to main activity.
>
> i already try to make my own listener and try to apply it, but it's
> useless, because there will be nullException in subActivity even thou
> inside the MainActivity i already set the listener. Hence i summarized
> that by using listener the Activity can't talk each other.
>
> anyone have any idea how can i do it?
>
> thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to