Passing Data Back to CrimeFragment
To give CrimeFragment access to the photo, you are going to pass the filename back from CrimeCameraFragment. Figure 20.5 shows the sequence of events between CrimeFragment and CrimeCameraFragment.
CrimeCameraActivity sets a result and an extra
First, CrimeFragment will start CrimeCameraActivity for a result. When a picture is taken, CrimeCameraFragment will create an intent with the filename as an extra and call setResult(…). The ActivityManager will forward the intent to CrimePagerActivity in onActivityResult(…). CrimePagerActivity’s FragmentManager will then forward the intent to CrimeFragment