Alternative solution


#1

Hi,

“If each crime has only one photo,” this could be another solution:

  • Pass in the crime id to CrimeCameraFragment and use the one (plus extension) as a filename,
  • CrimeCameraFragment returns only success(boolean), and
  • Remove filename field from Object Photo, Or flatten Crime Object and Photo Object by moving all the fields from Photo Object to Crime Object and add hasPhoto(boolean) field

This makes code simpler, which even does not need the logic for the upper half of the 2nd challenge, and save disk(memory) space when photos are re-taken many times.

Thanks,