May 2022
Intermediate to advanced
688 pages
20h 12m
English
Now that you have a MainActivity and a CheatActivity, you can think about passing data between them. Figure 7.7 shows what data you will pass between the two activities.
Figure 7.7 The conversation between MainActivity and CheatActivity
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 ...
Read now
Unlock full access