Android AdMob Rewarded Video ad tutorial

How to Integrate AdMob Rewarded Video Ads in Android Tutorial

What is Rewarded Video Ads ?

In this article we are going to talk about rewarded video Ads, a full screen video Ad which can help you monetize your application with AdMob Native Ads SDK.

Using AdMob Native Ads SDK you can display Video Ads in your application directly from google advertisers.

Rewarded video is a full screen Video Ad format which gives user the option to watch Video Ads in exchange of something, usually a game point.

Users have the choice not to watch Video Ads they are not interested in.

We will follow these steps

  1. Setup and Initialize Firebase Ads SDK.
  2. Request Rewarded Video Ads.
  3. Listen to Ad Events.
  4. Implement Activity lifecycle events.
  5. Ask User to Watch Video Ad.
  6. Show Video Ad.
  7. Reward user for watching Video Ads.

Rewarded Video Ads format

Rewarded Video Ads are click to download format Ad.

  • Which means every Rewarded Video Ad has app install button.
  • It also has end screen for every Video Ad like in Youtube videos.
  • User has option to close video Ads but user cannot skip video Ads.
  • If user has reached end screen or clicked install button it means user has watched video and only than developer will get paid.

Overview of Firebase Analytics with AdMob Rewared Video Ads

firebase admob analytics
AdMob Console linked with firebase

Lets start development.

Add Run time permission

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

Add Required dependency

Google Mobiloe Ads SDK (AdMob) is now linked with Firebase to get advantage of Firebase analytics. You just have to link AdMob and Firebase while creating Ad Unit ID’s.

compile ''

Setup Ad unit ID’s

Go to strings.xml file in your project and add below AdMob application ID and Ad Unit ID which you will get after creating a new Ad at AdMob Console.

For now you can use below test Ad ID’s.

<string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>
<string name="ad_unit_id">ca-app-pub-3940256099942544/5224354917</string>

Initialize Mobile Ads SDK

// Declare this variable inside your Activity.

private lateinit var mRewardedVideoAd: RewardedVideoAd

override fun onCreate(savedInstanceState: Bundle?) {

// It is recommended to use application context when initializing MobileAds SDK.


// Use activity context when getting instance of Rewarded video class.

mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this)
mRewardedVideoAd.rewardedVideoAdListener = this


} // onCreate() ends here

Request Rewarded Video Ads

private fun loadRewardedVideoAd() {

Enable Test Devices

If you are using emulator you do not need to do anything because emulators are automatically configured as test devices.

But if you are using real device for testing Rewarded Video Ads you need to provide test ad id while loading Ad.

I/Ads: Use AdRequest.Builder.addTestDevice("A68AD83F45A28BE7DB81F1FBAF84564D") to get test ads on this device.

You will find above in Android Studio Logcat. replace loadRewardedVideoAd() with below code.

private fun loadRewardedVideoAd() {


Listen to Ad Events

Implement RewardedVideoAdListener Interface in your Activity class. This interface has methods corresponding Video Ad lifecycle.

override fun onRewardedVideoAdClosed() {
    Log.d(this.localClassName, "on rewarded video Ad Closed")

override fun onRewardedVideoAdLeftApplication() {
    Log.d(this.localClassName, "on rewarded video Ad left application")

override fun onRewardedVideoAdLoaded() {
    Log.d(this.localClassName, "on rewarded video Ad loaded")

override fun onRewardedVideoAdOpened() {
    Log.d(this.localClassName, "on rewarded video Ad opened")

override fun onRewarded(p0: RewardItem?) {

    Log.d(this.localClassName, "on rewarded video Ad Rewared")

override fun onRewardedVideoStarted() {

    Log.d(this.localClassName, "on rewarded video Ad Started")

override fun onRewardedVideoAdFailedToLoad(p0: Int) {
    Log.d(this.localClassName, "on rewarded video Ad Failed to load")


Implement Activity lifecycle events

override fun onPause() {

override fun onResume() {

override fun onDestroy() {

Show video Ad to user

Do not explicitly call this function and show Video Ad to user.

Add a button watch video Ad and when user click to watch Video Ad only than show Ad to user.

private fun rewardDeveloperShowVideoAds() {
    if (mRewardedVideoAd.isLoaded) {


You have learned about Firebase Rewared Video AdMob Ads and how to integrate AdMob Rewarded Video Ads in your Android application using Kotlin programming language.

Recommended Reading 

How to show AdMob Native Advanced Ads in Android

Hello! I am Hammad Tariq. Jack of All trades and Yet master of Many! Senior Android Application Developer | Cross-platform Development | Flutter | Backend Development (Spring Boot + Kotlin + MySQL) | Blogger | Founder I am an all-around Mobile Developer who is passionate about learning the latest technologies and trends. I graduated from Air University Islamabad, Pakistan in 2015 but started working on Android Development, Universal Windows Apps development long before that. Currently, I am working as a team lead and Senior Android Developer at EVAMP SAANGA, Pakistan.
Posts created 43

2 thoughts on “How to Integrate AdMob Rewarded Video Ads in Android Tutorial

  1. hello
    please I need your help
    to add Rewarded Video Ads in Android using adobe animate cc

Comments are closed.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top

Contact Us