How to create a banner ad with admob and android studioIs there a way to run Python on Android?How do save an Android Activity state using save instance state?Create ArrayList from arrayHow can I create an executable JAR with dependencies using Maven?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?How do I fix android.os.NetworkOnMainThreadException?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?

How long can fsck take on a 30 TB volume?

Why do 3D printers have only one limit switch?

What is the radius of the circle in this problem?

Is there any evidence to support the claim that the United States was "suckered into WW1" by Zionists, made by Benjamin Freedman in his 1961 speech

How did Captain Marvel know where to find these characters?

Does Thread.yield() do anything if we have enough processors to service all threads?

Unicode-math and mathrm result in missing symbols

Why Faces eat each other?

Using wilcox.test() and t.test() in R yielding different p-values

Pre-1993 comic in which Wolverine's claws were turned to rubber?

Are wands in any sort of book going to be too much like Harry Potter?

What replaces x86 intrinsics for C when Apple ditches Intel CPUs for their own chips?

Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019

Renting a house to a graduate student in my department

Are double contractions formal? Eg: "couldn't've" for "could not have"

Two (probably) equal real numbers which are not proved to be equal?

How is it possible for this circuit to continue functioning correctly?

Rusty Chain and back cassette – Replace or Repair?

Company stopped paying my salary. What are my options?

if i accidentally leaked my schools ip address and someone d doses my school am i at fault

Double underlining a result in a system of equations with calculation steps on the right side

Is every story set in the future "science fiction"?

How does weapons training transfer to empty hand?

How can I make parentheses stick to formula?



How to create a banner ad with admob and android studio


Is there a way to run Python on Android?How do save an Android Activity state using save instance state?Create ArrayList from arrayHow can I create an executable JAR with dependencies using Maven?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?How do I fix android.os.NetworkOnMainThreadException?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.



sample Ad unit ID: ca-app-pub-3940256099942544/6300978111



sample App ID: ca-app-pub-3940256099942544~3347511713



my Ad unit ID: ca-app-pub-3034909524223644/38127934



my App ID: ca-app-pub-3034909524223644~23360602



I've used this ad unit id in an old application and it working
what should i do?



AndroidManifest.xml



 <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3034909524223644~2336060216" />

<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />


Layout.xml



 <com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />



Main




@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
View view =inflater.inflate(R.layout.fragment_home, container, false);


AdView adView = (AdView) view.findViewById(R.id.adView);
runAds(adView);

return view;


protected void runAds(AdView adView)
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);




dependencies



dependencies 
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.1'











share|improve this question






























    -1















    I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.



    sample Ad unit ID: ca-app-pub-3940256099942544/6300978111



    sample App ID: ca-app-pub-3940256099942544~3347511713



    my Ad unit ID: ca-app-pub-3034909524223644/38127934



    my App ID: ca-app-pub-3034909524223644~23360602



    I've used this ad unit id in an old application and it working
    what should i do?



    AndroidManifest.xml



     <meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-3034909524223644~2336060216" />

    <activity
    android:name="com.google.android.gms.ads.AdActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
    android:theme="@android:style/Theme.Translucent" />


    Layout.xml



     <com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_gravity="center"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    ads:adSize="BANNER"
    ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />



    Main




    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
    Bundle savedInstanceState)
    View view =inflater.inflate(R.layout.fragment_home, container, false);


    AdView adView = (AdView) view.findViewById(R.id.adView);
    runAds(adView);

    return view;


    protected void runAds(AdView adView)
    AdRequest adRequest = new AdRequest.Builder()
    .setRequestAgent("android_studio:ad_template").build();
    adView.loadAd(adRequest);




    dependencies



    dependencies 
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.+'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:26.0.+'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
    implementation 'com.google.android.gms:play-services-ads:17.1.1'











    share|improve this question


























      -1












      -1








      -1


      2






      I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.



      sample Ad unit ID: ca-app-pub-3940256099942544/6300978111



      sample App ID: ca-app-pub-3940256099942544~3347511713



      my Ad unit ID: ca-app-pub-3034909524223644/38127934



      my App ID: ca-app-pub-3034909524223644~23360602



      I've used this ad unit id in an old application and it working
      what should i do?



      AndroidManifest.xml



       <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-3034909524223644~2336060216" />

      <activity
      android:name="com.google.android.gms.ads.AdActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
      android:theme="@android:style/Theme.Translucent" />


      Layout.xml



       <com.google.android.gms.ads.AdView
      android:id="@+id/adView"
      android:layout_gravity="center"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      ads:adSize="BANNER"
      ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />



      Main




      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState)
      View view =inflater.inflate(R.layout.fragment_home, container, false);


      AdView adView = (AdView) view.findViewById(R.id.adView);
      runAds(adView);

      return view;


      protected void runAds(AdView adView)
      AdRequest adRequest = new AdRequest.Builder()
      .setRequestAgent("android_studio:ad_template").build();
      adView.loadAd(adRequest);




      dependencies



      dependencies 
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:26.1.0'
      implementation 'com.android.support:design:26.1.+'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:support-v4:26.0.+'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
      implementation 'com.google.android.gms:play-services-ads:17.1.1'











      share|improve this question
















      I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.



      sample Ad unit ID: ca-app-pub-3940256099942544/6300978111



      sample App ID: ca-app-pub-3940256099942544~3347511713



      my Ad unit ID: ca-app-pub-3034909524223644/38127934



      my App ID: ca-app-pub-3034909524223644~23360602



      I've used this ad unit id in an old application and it working
      what should i do?



      AndroidManifest.xml



       <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-3034909524223644~2336060216" />

      <activity
      android:name="com.google.android.gms.ads.AdActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
      android:theme="@android:style/Theme.Translucent" />


      Layout.xml



       <com.google.android.gms.ads.AdView
      android:id="@+id/adView"
      android:layout_gravity="center"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      ads:adSize="BANNER"
      ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />



      Main




      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState)
      View view =inflater.inflate(R.layout.fragment_home, container, false);


      AdView adView = (AdView) view.findViewById(R.id.adView);
      runAds(adView);

      return view;


      protected void runAds(AdView adView)
      AdRequest adRequest = new AdRequest.Builder()
      .setRequestAgent("android_studio:ad_template").build();
      adView.loadAd(adRequest);




      dependencies



      dependencies 
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:26.1.0'
      implementation 'com.android.support:design:26.1.+'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:support-v4:26.0.+'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
      implementation 'com.google.android.gms:play-services-ads:17.1.1'








      java android admob






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 2 at 12:45







      Alireza Amirkhani

















      asked Mar 23 at 8:48









      Alireza AmirkhaniAlireza Amirkhani

      33




      33






















          2 Answers
          2






          active

          oldest

          votes


















          0














          I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.






          share|improve this answer
































            0














            If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312096%2fhow-to-create-a-banner-ad-with-admob-and-android-studio%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.






              share|improve this answer





























                0














                I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.






                share|improve this answer



























                  0












                  0








                  0







                  I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.






                  share|improve this answer















                  I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 23 at 9:28

























                  answered Mar 23 at 9:16









                  pradip tilalapradip tilala

                  571518




                  571518























                      0














                      If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.






                      share|improve this answer



























                        0














                        If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.






                        share|improve this answer

























                          0












                          0








                          0







                          If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.






                          share|improve this answer













                          If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 23 at 8:51









                          Touhidul IslamTouhidul Islam

                          1,5201516




                          1,5201516



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312096%2fhow-to-create-a-banner-ad-with-admob-and-android-studio%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현