How to open intent and add value android -


i have trouble returning value intent in android. situation: have activity a, opened when start application. when click on button start activity b. in activity b fill in edittext , return string. click on button in activity b return activity a. don't know method should use in activity use value returned activity b.

this kind of situation fits startactivityforresult , onactivityforresult. when press on button, instead of calling startactivity call startactivityforresult in order start activityb. in activityb when click on button, have fill intent values want return activitya and, in order, call setresult(result, intent) , finish(). onactivityresult of activitya receive intent data

activity docs


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -