Is it possible to return object as a activity result from child activity to parent? Just something like:
Intent resultIntent = new Intent(null);
resultIntent.putExtra("STRING_GOES_HERE", myObject);
setResult(resultIntent);
finish();
If it is possible, how should I retrieve myObject
in parent activity?
I figured out, that to retrieve data I need to do something like this:
protected void onActivityResult (int requestCode, int resultCode, Intent data) {
if(requestCode == REQ_CODE_CHILD) {
MyClass myObject = data.getExtra("STRING_GOES_HERE");
}
}
Thing is that I get error, that can not resolve method 'getExtra'....