Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SaadAhmed1122/Kids_learnig_App/llms.txt
Use this file to discover all available pages before exploring further.
ScoringPage is the results screen that every standalone quiz Activity hands off to once all ten questions are answered. It receives a single integer — the number of wrong answers — through an Intent extra, decides which tier of reward imagery to show, plays a Google AdMob rewarded ad, and then sets the final result images and message. Children see one of three star ratings: zero stars for a rough round, two stars for a decent attempt, or three stars for an excellent performance. A back press from this screen returns the player to FinalmainScreen rather than to the quiz.
Receiving Quiz Results
ScoringPage reads the Wrong integer extra that the calling quiz Activity places on its outgoing Intent:
ScoringPage.onCreate(), the value is retrieved with:
Only activities running in standalone mode (
seq == 0) launch ScoringPage. When a quiz runs as part of a Sequence Game it calls finish() instead, so ScoringPage is never shown mid-chain.Three-Tier Result System
Performance is divided into three tiers based on how many questions the child answered incorrectly.| Wrong Answers | Result Image | Stars Drawable | On-Screen Message |
|---|---|---|---|
>= 7 | zeroscore | reward_star1 | "Play Again.. !!!" |
4 – 6 (< 7 and > 3) | smile_reward | reward_start2 | "No Bad Play Again!" |
0 – 3 (< 3) | reward_2323917_2155564 | reawar_start3 | "Congratulations Well Played" |
Result Logic (Java)
AdMob Rewarded Ad Integration
ARewardedAd is loaded during onCreate(). When the ad is ready, it is shown before the result images are set, so the reward moment feels earned. The result drawables and text are applied inside the ad’s callback handlers, ensuring they appear only after the ad interaction completes.
Load ad in onCreate
RewardedAd.load() is called with the AdMob ad unit ID as soon as the activity is created, giving the ad maximum time to fetch before it is needed.Ad shown on result screen
Once the quiz data is ready, the loaded rewarded ad is displayed. The child watches a short video or interacts with the ad format.
Why show the ad before the result images?
Why show the ad before the result images?
Displaying the rewarded ad first creates a natural pause that builds anticipation. The star rating and celebratory image are then revealed as an immediate follow-up reward, reinforcing the ad-completion action with positive visual feedback.
Navigation
| Action | Destination |
|---|---|
| Back button pressed | FinalmainScreen (via onBackPressed) |
| Play again (implicit) | Child re-launches the quiz from FinalmainScreen |
Calling
finish() after starting FinalmainScreen ensures ScoringPage is removed from the back stack, so pressing Back on the main screen does not return to the results.Related Pages
- Emotions Quiz — standalone quiz that sends
Wrongto this screen - Transport Quiz — standalone quiz that sends
Wrongto this screen - Things Quiz — standalone quiz that sends
Wrongto this screen - Sequence Game — chained mode that bypasses this screen entirely