android - How to Pass object from sub activity to main activity? -
from activitya i'm starting activityb.
in activityb i'm creating new serializable object.
after object has been created want close activityb , pass new object activitya.
how can it?
start activity b startactivityforresult()
.
in activity b, when object created create intent pack object in:
intent result = new intent(); result.putextra("result", object); setresult(result_ok, result);
then receive intent in onactivityresult()
method of activity a, can extract so:
data.getserializableextra("result");
Comments
Post a Comment