March 2013
Beginner to intermediate
580 pages
16h 11m
English
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.
Figure 20.5 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
Read now
Unlock full access