Challenge: Closing Loopholes for Cheaters

Cheaters never win. Unless, of course, they persistently circumvent your anticheating measures. Which they probably will. Because they are cheaters.

GeoQuiz has a major loophole. Users can rotate CheatActivity after they cheat to clear out the cheating result. When they go back to MainActivity, it is as if they never cheated at all.

Fix this bug by persisting CheatActivity’s UI state across rotation and process death using the techniques you learned in Chapter 4.

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.