Challenge comments


One other loophole is re-clicking on the Cheat! Button, then hitting Back without choosing Show Answer. I had failed to consider the other loopholes.

If this were a business challenge, instead of an exercise to build new programming skill, the clear and obvious solution would be to delete the whole cheat activity. “Add lightness” was Colin Chapman’s philosophy in building race cars, and I suspect it applies well to programming, also.


If it were a business challenge, we might also require the user to pay a nominal fee to cheat. :slight_smile:


I need help with this challenge. How do we make it so mIsCheater doesn’t get cleared out when screen is rotated?


See the suggestion i did in the topic:


This was the first loophole I found myself as well, and I thought it should be added to the book. I think the best (or at least a) solution for this would be to send an extra intent that would hold the value of whether mIsCheater. Then instead of in the create calling setAnswerShownResult with just the savedInstanceState value you || (or) that with the extra intent and if either one is true then they are a cheater and the correct result code is returned.