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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.