The Kids Learning App monetises through Google AdMob, serving interstitial, rewarded, and banner ads at key moments in the user journey. The integration uses theDocumentation 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.
play-services-ads:19.6.0 SDK and stores ad unit IDs as string resources so they can be swapped without touching Java source files. An AdsClass helper provides a convenience method for triggering interstitial ads from any Activity.
App ID Configuration
The AdMob App ID is declared as a<meta-data> element inside <application> in AndroidManifest.xml:
Ad Unit IDs
Ad unit IDs are stored as string resources inres/values/strings.xml so they remain outside the compiled bytecode and are easy to update.
| String Resource | Ad Type | Used In |
|---|---|---|
R.string.Intusitus_ad | Interstitial | FinalmainScreen, GameMainAct (via AdsClass) |
R.string.reward_ad | Rewarded | FinalmainScreen, ScoringPage |
AdView in the Show_ImagesMain layout rather than through a shared string resource.
Where Ads Appear
Each Activity opts into specific ad formats based on the user action happening in that screen:| Activity | Ad Type | Trigger |
|---|---|---|
FinalmainScreen | Interstitial + Rewarded | Activity creation / game completion |
ScoringPage | Rewarded | Score screen shown to player |
Show_ImagesMain | Banner (AdView) | Always visible while browsing images |
GameMainAct | Interstitial | On create, via AdsClass.showintertialeAds() |
AdsClass Helper
AdsClass is a context-based helper instantiated with an Android Context. Its showintertialeAds() method is called from GameMainAct.onCreate() to display an interstitial at launch.
The Facebook Audience Network code inside
AdsClass.showintertialeAds() is currently commented out, making the method a no-op on its own. Interstitial and rewarded ads are wired directly inside each Activity rather than delegated to AdsClass. If you want to centralise ad loading, wire the AdMob calls through AdsClass explicitly.Development: Test Ad IDs
During development and QA always use Google’s official test credentials to avoid invalid traffic penalties.| Resource | Test Value |
|---|---|
| App ID | ca-app-pub-3940256099942544~3347511713 |
| Interstitial unit ID | ca-app-pub-3940256099942544/1033173712 |
| Rewarded unit ID | ca-app-pub-3940256099942544/5224354917 |
| Banner unit ID | ca-app-pub-3940256099942544/6300978111 |
Steps to Replace with Production AdMob IDs
Update the App ID in AndroidManifest.xml
Replace the
android:value of the com.google.android.gms.ads.APPLICATION_ID meta-data with the App ID from your AdMob dashboard.Update ad unit string resources
Open
res/values/strings.xml and set the correct production values for Intusitus_ad and reward_ad:Update the banner AdView unit ID
In the
Show_ImagesMain layout (or its Activity), replace the inline banner ad unit ID with your production banner unit ID.