As you can see from the documentation the way to start an Activity to have data passed back is like so:
- Start the
Activityusing the callstartActivityForResult(Intent intent, int requestCode). - In the started
ActivitycallsetResult(int resultCode, Intent data). - Implement
onActivityResult(int, int, Intent)on the callingActivity.
The question is: is their a pattern or design consideration for using an Intent in this situation where as everywhere else inter-activity data is represented as a Bundle?
Until I get a more detailed answer the only thing I can think is that this has been done specifically to give the called Activity increased control over the resulting action.
The only scenario I can see where it would be better to be done in this way is if the called Activity was in another sandbox and could construct the Intent using an explicit
Classreference rather than through the use of anActionlocking the resulting call to that of the specified explicitActivity.