android onActivityResult vs getIntent -
both onactivityresult
, getintent
receives intent other activities.
when 1 used on another?
i think onactivityresult called after call startactivityforresult receive result.
i guess getintent
used receive intent sent other me. correct?
below understanding how it's used, wonder if understanding correct.
- i register listen intents (probably in manifest)
- when registered intents delivered, responsible activity resumes (or gets created)
- getintent should placed in
onresume
check intent - one should dispose used intent removing whatever data inside intent
i think onactivityresult called after call startactivityforresult receive result.
on onactivityresult
called when finish()
activity started startactivityforresult
. can provide intent
setresult
, part of onactivityresult
i guess getintent used receive intent sent other me. correct?
getintent()
returns intent started current activity
Comments
Post a Comment