Google AdMob is the leading mobile ad platform for Android. It serves banner, interstitial, rewarded, and native ads — paying you when users view or click ads in your app.
Your Android App
↓
Google Mobile Ads SDK
↓
AdMob Ad Server → Advertisers
↓
Revenue (CPM / CPC) → Your AdMob Account
Ad Format
Appearance
Best For
Banner
Small strip at top/bottom
Continuous passive income
Interstitial
Full-screen between screens
Level transitions, natural breaks
Rewarded
Full-screen, user opts in
Extra lives, coins, premium content
Native
Matches app UI design
Feed lists, content screens
1AdMob Setup
Setting up AdMob involves creating an account, registering your app, adding the Mobile Ads SDK, and initializing it with your App ID before loading any ads.
Kotlin — Google test ad unitsobject TestAdUnits {
const val BANNER = "ca-app-pub-3940256099942544/6300978111"
const val INTERSTITIAL = "ca-app-pub-3940256099942544/1033173712"
const val REWARDED = "ca-app-pub-3940256099942544/5224354917"
const val NATIVE = "ca-app-pub-3940256099942544/2247696110"
}
2Banner Ads
Banner ads are rectangular ads displayed at the top or bottom of the screen. They remain visible while the user interacts with your app and are the simplest ad format to implement.
Place at bottom — less intrusive than top placement
Use adaptive banners for better fill rate on all screen sizes
Don't place banners over interactive UI elements
Pause/resume/destroy AdView with Activity lifecycle
3Interstitial Ads
Interstitial ads are full-screen ads shown at natural transition points — between levels, after completing a task, or when navigating between major screens. Preload them before showing.
Load and show interstitial
Kotlin — InterstitialAdHelper.ktclass InterstitialAdHelper(private val activity: Activity) {
private var interstitialAd: InterstitialAd? = null
fun loadAd(adUnitId: String) {
InterstitialAd.load(
activity,
adUnitId,
AdRequest.Builder().build(),
object : InterstitialAdLoadCallback() {
override fun onAdLoaded(ad: InterstitialAd) {
interstitialAd = ad
Log.d("AdMob", "Interstitial loaded")
setupCallbacks(ad)
}
override fun onAdFailedToLoad(error: LoadAdError) {
interstitialAd = null
Log.e("AdMob", "Interstitial failed: ${error.message}")
}
}
)
}
private fun setupCallbacks(ad: InterstitialAd) {
ad.fullScreenContentCallback = object : FullScreenContentCallback() {
override fun onAdDismissedFullScreenContent() {
interstitialAd = null
loadAd(TestAdUnits.INTERSTITIAL) // preload next
}
override fun onAdFailedToShowFullScreenContent(error: AdError) {
interstitialAd = null
}
}
}
fun showAd() {
interstitialAd?.show(activity) ?: run {
Log.d("AdMob", "Interstitial not ready yet")
loadAd(TestAdUnits.INTERSTITIAL)
}
}
}
Show at natural break points
Kotlin — Show after level completeclass GameActivity : AppCompatActivity() {
private lateinit var interstitialHelper: InterstitialAdHelper
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
interstitialHelper = InterstitialAdHelper(this)
interstitialHelper.loadAd(TestAdUnits.INTERSTITIAL)
}
private fun onLevelComplete() {
showLevelCompleteDialog()
interstitialHelper.showAd() // natural break point
}
}
Frequency capping
Kotlin — Limit ad frequencyclass AdFrequencyManager(context: Context) {
private val prefs = context.getSharedPreferences("ad_prefs", Context.MODE_PRIVATE)
fun canShowInterstitial(minIntervalMs: Long = 60_000): Boolean {
val lastShown = prefs.getLong("last_interstitial", 0)
return System.currentTimeMillis() - lastShown >= minIntervalMs
}
fun recordInterstitialShown() {
prefs.edit().putLong("last_interstitial", System.currentTimeMillis()).apply()
}
}
4Rewarded Ads
Rewarded ads let users opt in to watch a video ad in exchange for in-app rewards — extra lives, coins, or premium features. They have the highest engagement and eCPM of standard ad formats.
Load and show rewarded ad
Kotlin — RewardedAdHelper.ktclass RewardedAdHelper(private val activity: Activity) {
private var rewardedAd: RewardedAd? = null
fun loadAd(adUnitId: String) {
RewardedAd.load(
activity,
adUnitId,
AdRequest.Builder().build(),
object : RewardedAdLoadCallback() {
override fun onAdLoaded(ad: RewardedAd) {
rewardedAd = ad
Log.d("AdMob", "Rewarded ad loaded")
}
override fun onAdFailedToLoad(error: LoadAdError) {
rewardedAd = null
Log.e("AdMob", "Rewarded ad failed: ${error.message}")
}
}
)
}
fun showAd(onRewardEarned: (Int) -> Unit) {
val ad = rewardedAd
if (ad == null) {
Toast.makeText(activity, "Ad not ready. Try again.", Toast.LENGTH_SHORT).show()
loadAd(TestAdUnits.REWARDED)
return
}
ad.fullScreenContentCallback = object : FullScreenContentCallback() {
override fun onAdDismissedFullScreenContent() {
rewardedAd = null
loadAd(TestAdUnits.REWARDED)
}
}
ad.show(activity) { rewardItem ->
Log.d("AdMob", "User earned: ${rewardItem.amount} ${rewardItem.type}")
onRewardEarned(rewardItem.amount.toInt())
}
}
}
Beyond ads, successful Android apps combine multiple revenue streams. Choose a strategy that matches your app category, user base, and retention goals.
Monetization models
Model
How It Works
Best For
Free + Ads
AdMob banner/interstitial/rewarded
Casual games, utility apps
Freemium
Free app, paid premium features
Productivity, fitness apps
In-App Purchases
Buy coins, remove ads, unlock content
Games, media apps
Subscription
Monthly/yearly recurring payment
Streaming, SaaS, news
Paid App
One-time purchase on Play Store
Pro tools, niche apps
Hybrid
Ads + IAP + subscription tiers
Most top-grossing apps
Hybrid strategy example
Free Tier Premium Tier ($4.99/mo)
───────── ──────────────────────
Banner ads at bottom No ads
Interstitial every 3 levels Unlimited levels
Watch rewarded ad for coins 1000 coins/month included
Basic features All features unlocked
Remove ads with in-app purchase
Kotlin — Hide ads for premium usersclass AdManager(private val context: Context) {
private val prefs = context.getSharedPreferences("billing", Context.MODE_PRIVATE)
fun isPremiumUser(): Boolean = prefs.getBoolean("is_premium", false)
fun shouldShowAds(): Boolean = !isPremiumUser()
fun setupBanner(adView: AdView) {
if (shouldShowAds()) {
adView.visibility = View.VISIBLE
adView.loadAd(AdRequest.Builder().build())
} else {
adView.visibility = View.GONE
}
}
}
AdMob policy essentials
Never click your own ads or encourage users to click
Use test ad units during development — real clicks on test builds violate policy
Don't place ads too close to buttons (accidental clicks)
Disclose data collection in your privacy policy
Follow Google Play Families Policy if targeting children
Optimize revenue
Tip
Impact
Use rewarded ads for optional boosts
Higher eCPM, better UX
Enable AdMob mediation
More advertisers compete → higher bids
Cap interstitial frequency
Lower uninstall rate, better retention
A/B test ad placement
Find balance of revenue vs retention
Target tier-1 countries
Higher CPM in US, UK, CA, AU
6Hands-On Exercises
1
Complete AdMob setup — create account, add app, integrate SDK, initialize with test App ID.
2
Add an adaptive banner ad at the bottom of MainActivity. Handle pause/resume/destroy lifecycle.
3
Implement interstitial ads shown after completing a task. Preload the next ad after dismiss.
4
Add a "Watch Ad for Coins" button with rewarded ads. Grant in-app reward on completion.
5
Implement frequency capping — show interstitials no more than once per minute.
6
Build a premium toggle that hides all ads when the user "purchases" remove-ads (simulate with SharedPreferences).
7
Bonus: Write a monetization plan for a game app — choose ad formats, IAP items, and subscription tier.
AdMob & Monetization MCQ Practice
10 Basic MCQs10 Advanced MCQs
10 Basic AdMob & Monetization MCQs
1
AdMob is?
ADatabase
BGoogle mobile advertising platform
CLayout editor
DKotlin compiler
Explanation: Monetize apps with banner, interstitial, rewarded ads.
2
App ID format?
AAPI-34
Bcom.example.app
Cca-app-pub-XXXX~YYYY
DSHA-256 only
Explanation: Declared in manifest meta-data APPLICATION_ID.
3
Banner ads are?
AIn-app purchase
BFull screen only
CVideo only
DRectangular ads at top or bottom
Explanation: Persistent small format while using app.
4
Interstitial ads show?
AFull-screen at natural breaks
BAlways on launch
CIn notification
DSQL query
Explanation: Between levels or screen transitions — preload first.
5
Rewarded ads give?
AFree premium forever
BUser reward after watching video ad
CRoot access
DNo SDK
Explanation: User opts in for coins, extra life, etc.
6
Test ad units during dev?
ANo ads in debug
BProduction IDs only
CGoogle sample ad unit IDs
DRandom IDs
Explanation: Avoid invalid traffic on your real ad units.
7
MobileAds.initialize?
ABanned API 34
BOptional
CReplaces manifest
DRequired before loading ads
Explanation: Call in Application onCreate.
8
AdView lifecycle?
Apause/resume/destroy with Activity
BIgnore lifecycle
COnce forever
DService only
Explanation: Prevent leaks and wasted impressions.
9
INTERNET permission for ads?
ANot needed
BRequired for ad network requests
CDangerous runtime
DCamera
Explanation: Normal permission in manifest.
10
eCPM means?
AAd size
BError code
CEffective cost per thousand impressions
DGradle metric
Explanation: Revenue metric — varies by region and format.