Passing Data Between Activities
Now that you have a MainActivity and a CheatActivity, you can think about passing data between them. Figure 6.8 shows what data you will pass between the two activities.
Figure 6.8 The conversation between
The MainActivity will inform the CheatActivity of the answer to the current question when the CheatActivity is started.
When the user presses the Back button to return to the MainActivity, the CheatActivity will be destroyed. In its last gasp, it will send data to the MainActivity about whether the user cheated.
You will start with passing data from MainActivity ...