Android , Admob
<p>I am trying to integrate AdMob in my application and i have checked successfully AdMob example and got add on my android device but when i am trying to do same code for my app that s not working ... Please help </p>

<p>My Code </p>

<pre><code>   private void startGame() {
        // Request a new ad if one isn't already loaded, hide the button, and kick off the timer.
        if (!mInterstitialAd.isLoading() &amp;&amp; !mInterstitialAd.isLoaded()) {

runOnUiThread(new Runnable() {
    @Override
    public void run() {
        AdRequest adRequest = new AdRequest.Builder()
                .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
                .addTestDevice("0C3BF98F2CA55F66D0BE2D63D962BF6D")
                .build();
        mInterstitialAd.loadAd(adRequest);
    }
});

        }


    }
    InterstitialAd mInterstitialAd;

    void StartAds()
    {
        MobileAds.initialize(this, "ca-app-pub-3940256099942544~1033173712");
        mInterstitialAd = new InterstitialAd(this);
        // Defined in res/values/strings.xml
        mInterstitialAd.setAdUnitId(getString(R.string.google_home_ad_unit_id));

        mInterstitialAd.setAdListener(new AdListener() {
            @Override
            public void onAdClosed() {

            }
        });


        if (mInterstitialAd != null &amp;&amp; mInterstitialAd.isLoaded()) {
            mInterstitialAd.show();
        } else {

            startGame();
        }

    }
</code></pre>

<p>manifest File</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ads.example"&gt;

    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;



    &lt;application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"&gt;

        &lt;meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/&gt;
        &lt;activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" /&gt;

    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>gradle </p>

<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
defaultConfig {
    applicationId "example.ads.app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.google.firebase:firebase-ads:9.0.0'
}

apply plugin: 'com.google.gms.google-services'

/

/ Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
</code></pre>