Activity destroyed before onActivtyResult Android -


ok, i'm startactivityforresult take picture , save storage, file have specified (its path).

i ran strange thing didn't know -

when start activity result in 1 orientation, , switch orientation when finishing other activity, since orientation of activity has changed, ondestroy called , oncreate, onstart, , after onactivityresult, means cannot when activity if need data persist in onsaveinstancestate.

am correct , why so?

the order how functions called in first activity when second activity finishes is

  • destroy
  • create
  • start
  • activityresult

isn't more reasonable be

  • activityresult
  • pause
  • saveinstancestate
  • stop
  • destroy
  • create

so, if there's no use save in onsaveinstancestate, should in onpause? , best way it?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -