Importent Bug in the finished App:


Hey there,

after I finished the CriminalIntent-App, I discovered something:

When you start the App, the saved Crimes are shown in the List. When you delete some of these crimes by long clicking on it and then delete it, it disapeares from the list. But when you then close the App
and re-open it, the List of Crimes is the same as before you deleted one or several crimes.

That is, because in the Lifecycle of CrimeListFragment the method saveCrimes of the CrimeLab is never called. I implemented it in onStop() of CrimeListFragment and it works.
Maybe someone else has also discovered this Issue and wants to tell us, how he/she managed it.

Cheers Jan


That’s correct. One thing to keep in mind is that onStop() along with onDestroy may not be called in Pre-HoneyComb versions. For backward compatibility, best to place the call to saveCrimes() in the onPause() callback method.