Reputation: 1492
is there a way to get result from activity to one activity before the calling activity becuse the calling activity have noHistory attribute and the back button passing me to the one before?!
thanks for the help!
Upvotes: 2
Views: 2791
Reputation: 128448
Yes obvious you just need to start the new activity by using startActivityForResult()
Here is the full description for the implementation of this method.
Brief Description:
You just need to start the target activity by using startActivityForResult()
method same as we do by using startActivity()
. Now it will redirect you in target activity, residing inside it, do all the processes and at the end just call setResult()
method. So it will again get back to you in Source activity. Inside this you need to override the onActivityResult()
method. Here you get the result from target activity.
Upvotes: 1
Reputation: 684
StartActivityForResult()
Android Developer - http://developer.android.com/guide/topics/fundamentals/activities.html
Example - http://android-er.blogspot.com/2011/08/return-result-to-onactivityresult.html
Upvotes: 0
Reputation: 27757
This is a decently short explanation of how the Activity result process works:
http://saigeethamn.blogspot.com/2009/08/android-developer-tutorial-for_31.html
Look for the "Starting Activities and Getting Results" heading under the Activity documentation in the stock Android documentation:
http://developer.android.com/reference/android/app/Activity.html
Upvotes: 1