user7386860
user7386860

Reputation:

Android Admob Integration Doesn't show ad

i've sucessfully integrate Admob in my app . i have my Admob key . but it isn't working . it is not showing ads in app.

This is my XML . this is what i've done so far

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.radioaudio.motivationalaudios.MyYouTubePlayer">

    <com.google.android.youtube.player.YouTubePlayerView
        android:id="@+id/youtube_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/videoTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:text="Arise, Awake and stop not till the truth is known - Radio Story | IIT Kanpur Radio"
        android:textColor="#000"
        android:textSize="20dp" />

    <com.google.android.gms.ads.NativeExpressAdView
        android:id="@+id/adView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        ads:adUnitId="ca-app-pub-5059726881726792/7013814664"
        ads:adSize="280x132">
    </com.google.android.gms.ads.NativeExpressAdView>

</LinearLayout>

my java code

 NativeExpressAdView adView = (NativeExpressAdView) findViewById(R.id.adView);

        AdRequest request = new AdRequest.Builder()
                .addTestDevice("A5E3E2068BD88202CBC281AD76984BEE")
                .build();
        adView.loadAd(request);

Upvotes: 0

Views: 62

Answers (1)

Tejas Pandya
Tejas Pandya

Reputation: 4087

Native ads takes time to show. So kindly wait for 2-3 hours. They will pop up automatically. you might created your Account just a minute ago ..

Upvotes: 1

Related Questions