How to Integrate AdMob in an Android App

Google AdMob gives Android developers a practical way to earn revenue from banner, interstitial, native and rewarded advertising. A successful integration involves more than placing an advert on a screen: the app must load the Mobile Ads SDK correctly, request consent where required, use test inventory during development and present ads without damaging the user experience.

For Australian developers, the right approach also considers local privacy expectations, mobile data costs and different audience habits. Someone checking an app on a train in Sydney, Melbourne or Brisbane may have limited connectivity, while a family using a game on a tablet in Perth may respond better to rewarded advertising than disruptive full-screen placements.

Set Up Your AdMob Account And Android Project

Create an AdMob account, add your Android application and register its package name. If the app is not yet published on Google Play, you can still add it manually. AdMob will provide an application ID, which identifies the entire app, and separate ad unit IDs for individual placements such as banners or rewarded videos.

Add the Google Mobile Ads SDK to the app module using the current dependency recommended in Google’s Android documentation. A typical Kotlin project also needs internet access in its manifest:

<uses-permission android:name="android.permission.INTERNET" />

Place the AdMob application ID inside the <application> element in AndroidManifest.xml. The application ID is different from an ad unit ID, so check that each value is copied into the correct location. A misplaced or incomplete ID can cause startup errors or prevent ads from loading.

Initialise the SDK once, usually in an Application subclass or the first suitable activity:

MobileAds.initialize(this) { status ->
    // The SDK is ready for ad requests
}

Initialisation is asynchronous, so avoid designing the screen around the assumption that an advert will appear immediately. Your content should remain usable if the network is slow, the request fails or no suitable ad is available.

Choose Ad Formats That Suit The User Journey

Banner ads are persistent, relatively simple to implement and suitable for screens where users spend time reading or browsing. They can work in a utility app, recipe app or quiz results screen, but they should not cover buttons, navigation controls or important content. Adaptive banners can adjust to available width and provide a better fit across Android phones and tablets.

Interstitial ads occupy the whole screen and are best placed at natural pauses, such as after a completed level or when a user leaves a results screen. Avoid showing one immediately after launch, during active gameplay or every time a user taps a button. Frequent interruptions are particularly frustrating on smaller phones and can lead to poor ratings.

Rewarded ads allow a user to opt in to watching a video in exchange for an in-app benefit. A quiz app might offer an extra hint, a retry or access to a bonus category. If you are building a data-driven quiz, this SQLite quiz example can help inform where a reward fits naturally into the content flow.

Request Ads Safely In Kotlin

A banner can be added through an AdView in XML or created in Kotlin. The view needs the correct ad unit ID and an AdRequest:

val adView = findViewById<AdView>(R.id.bannerAd)
adView.adListener = object : AdListener() {
    override fun onAdFailedToLoad(error: LoadAdError) {
        // Record the failure without breaking the screen
    }
}
adView.loadAd(AdRequest.Builder().build())

Use Google’s dedicated test ad unit IDs while developing. Clicking your own live adverts, repeatedly refreshing them or using production inventory in an emulator can create invalid-traffic concerns. Test devices can also be configured through the SDK, which is useful when testing on a physical handset in Adelaide or Canberra.

For interstitials and rewarded formats, load the advert before the user reaches the transition point. Check that the object is available before displaying it, then attach callbacks for dismissal, completion and failure. Release or reload the relevant object according to the SDK’s current lifecycle guidance rather than assuming a loaded advert can be shown indefinitely.

Handle Consent, Privacy And Australian Requirements

Advertising requests may use information such as an advertising identifier, device signals and approximate location. Use Google’s User Messaging Platform where required to present consent choices and determine whether personalised advertising is permitted. The consent flow should be clear, accessible and shown at an appropriate time, rather than hidden behind confusing screens.

Australia’s Privacy Act and the Australian Privacy Principles are important considerations when an app collects or shares personal information. Review what the app sends to Google, publish an accurate privacy policy and explain advertising and analytics practices in plain English. If the product is aimed at children, apply additional care to age screening, ad suitability and Google Play Families requirements.

Australian users are also sensitive to unnecessary data usage. A person commuting on Sydney’s trains or using regional mobile coverage may appreciate an app that avoids repeatedly refreshing a banner or preloading heavy video content. Cache content sensibly, provide a functional experience when ads fail and make sure consent screens remain usable on slower connections.

Compare Formats Before Release

The best placement depends on the app’s rhythm, audience and revenue model. A high-value subscription app may use fewer adverts, while a free casual game can use rewarded video more often if the benefit is transparent. Test placements with real user flows rather than judging performance only from a development screen.

Ad format Suitable placement Main advantage Common risk
Banner Reading, browsing or results screens Continuous visibility Clutter or accidental taps
Interstitial Natural breaks between tasks Stronger revenue per impression Interrupting the user
Rewarded Optional hints, retries or bonuses User-controlled value exchange Poor reward design
Native Feeds or content lists Can match the app layout Misleading visual treatment

Track meaningful events such as ad requests, successful loads, impressions and reward completions. Do not treat every failed load as a serious application error. Network problems, limited inventory, consent choices and ad serving restrictions can all affect delivery.

Test Performance And Policy Compliance

Check every advert on different screen sizes, orientations and Android versions. Confirm that banners do not overlap system navigation, interstitials do not appear during essential actions and rewarded benefits are granted only after the SDK confirms completion. Test with airplane mode or a restricted connection so the app behaves well without advertising access.

Review Google Play’s advertising, data safety and disruptive-ad policies before publishing. An app should never encourage accidental clicks, disguise an advert as a system message or show full-screen content when the user is trying to exit. Store screenshots and descriptions should also reflect the actual product experience.

Measure retention alongside revenue. A placement that increases short-term impressions but causes users to uninstall is usually a poor trade-off. For Australian audiences, consider testing different times and connection conditions, including evening home use, commuting periods and lower-bandwidth regional access.

After release, monitor AdMob reports, crash logs and user feedback. Keep SDK dependencies current, check policy notifications and update your privacy documentation when data practices change. If the app becomes popular, add app-ads.txt through the developer website and verify that the authorised seller information is correct.

Set up a small internal test group, implement consent before production traffic, and launch with test ad units until every placement has passed functional and policy checks. Then replace them with live IDs, monitor the first release closely and refine placements around genuine moments of user value.