I/Ads: Ad is not visible. Not refreshing ad.

3,019 views
Skip to first unread message

Vladimir Shestakov

unread,
Jan 16, 2017, 1:50:45 PM1/16/17
to Google Mobile Ads SDK Developers
Please help fix the issue
I set up a admob
banner in accordance with the instructions, But the banner is not displayed. Log have such messages

I/Ads: Scheduling ad refresh 60000 milliseconds from now.
I/Ads: Ad finished loading.
...........................................................................

I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
.....................................................................

Thanks in advance.

Ivan Bautista (Mobile Ads SDK Team)

unread,
Jan 16, 2017, 11:08:56 PM1/16/17
to Google Mobile Ads SDK Developers
Hi Vladimir,

Can you try running your Ad Unit ID/s in question with our sample app and verify if the problem is reproducible? If the issue persist using your Ad Unit ID in our sample app, then can you provide us privately your Ad Unit ID/s in question. Also, could you provide us any error or warning logs relevant to your ad request?

You may also send us a code snippet/ miniature sample app that contains the implementation where the issue is replicable.

Best Regards,
Ivan Bautista
Mobile Ads SDK Team

Vladimir Shestakov

unread,
Jan 17, 2017, 2:24:39 AM1/17/17
to Google Mobile Ads SDK Developers
Hi Ivan.

Thanks for the response.

Of course, I tried to use my unit ID in the example BannerExample. As a result, I saw the real banners. Also, I tried to substitute the unit ID from the example and message in the log was the same ka I described in the first post. I tried to create a new banner - the problem remained. The AdMob  banner is still invisible

Now in the console AdMob shows this situation (Fig. 1)

Unit ID ca-app-pub-6564422200233347/9589103314

There are code fragments:

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

activity_main.xml
<com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    ads:adSize="BANNER"
    ads:adUnitId="@string/admob_publisher_id">
</com.google.android.gms.ads.AdView>

main.java
MobileAds.initialize(getApplicationContext(), "ca-app-pub-6564422200233347~2881794514");

mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);

.............

/** Called when leaving the activity */
@Override
public void onPause() {
   
if (mAdView != null) {
       
mAdView.pause();
   
}
   
super.onPause();
}
/** Called when returning to the activity */
@Override
public void onResume() {
   
super.onResume();
   
this.doubleBackToExitPressedOnce = false;
   
if (mAdView != null) {
       
mAdView.resume();
   
}
}
/** Called before the activity is destroyed */
@Override
public void onDestroy() {
   
if (mAdView != null) {
       
mAdView.destroy();
   
}
   
super.onDestroy();
}





build.gradle
    dependencies {
        compile
'com.android.support:support-v4:25.1.0'
        compile 'com.android.support:appcompat-v7:25.1.0'
        compile 'com.google.firebase:firebase-core:10.0.1'
        compile 'com.google.firebase:firebase-ads:10.0.1'

    }

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

This is the Run Log from the app started
I/Ads: Starting ad request.
I
/Ads: Use AdRequest.Builder.addTestDevice("7BA6EC08E3EB8757D4CAACF9C56EEB68") to get test ads on this device.
I
/WhatsNewScreen: versionCode 9is already known
W
/art: Attempt to remove local handle scope entry from IRT, ignoring
W
/AwContents: onDetachedFromWindow called when already detached. Ignoring
W
/art: Attempt to remove local handle scope entry from IRT, ignoring
W
/art: Attempt to remove local handle scope entry from IRT, ignoring
I
/chromium: [INFO:SkFontConfigParser_android.cpp(187)] ---- Font alias target DINPro (NOT FOUND)
I
/chromium: [INFO:SkFontConfigParser_android.cpp(187)] ---- Font alias target DINPro (NOT FOUND)
I
/chromium: [INFO:SkFontConfigParser_android.cpp(187)] ---- Font alias target DINPro (NOT FOUND)
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078ea6500, url = https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_as_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_dinmo_gcache&eid=318475406%2C318476426%2C318477028&format=320x50_mb&heap_free=994368&heap_max=268435456&heap_total=46555216&js=afma-sdk-a-v10084248.10084000.2&msid=com.vlsoft.terms2k10&preqs=4&scroll_index=-1&seq_num=5&target_api=25#_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_as_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_dinmo_gcache&eid=318475406%252C318476426%252C318477028&format=320x50_mb&heap_free=994368&heap_max=268435456&heap_total=46555216&js=afma-sdk-a-v10084248.10084000.2&msid=com.vlsoft.terms2k10&preqs=4&scroll_index=-1&seq_num=5&target_api=25, m_isReload = 0,
W
/WebKit: ResourceFetcher::requestResource, type = 0, policy = 0, url = https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_as_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_dinmo_gcache&eid=318475406%2C318476426%2C318477028&format=320x50_mb&heap_free=994368&heap_max=268435456&heap_total=46555216&js=afma-sdk-a-v10084248.10084000.2&msid=com.vlsoft.terms2k10&preqs=4&scroll_index=-1&seq_num=5&target_api=25
W
/BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 32694
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e04500, url = https://tpc.googlesyndication.com/pagead/js/r20170103/r20110914/client/ext/m_js_controller.js, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 3, policy = 0, url = https://tpc.googlesyndication.com/pagead/js/r20170103/r20110914/client/ext/m_js_controller.js
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e04a00, url = https://tpc.googlesyndication.com/pagead/js/r20170103/r20110914/abg.js, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 3, policy = 0, url = https://tpc.googlesyndication.com/pagead/js/r20170103/r20110914/abg.js
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e04000, url = https://googleads.g.doubleclick.net/pagead/images/abg/iconx2-000000.png, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://googleads.g.doubleclick.net/pagead/images/abg/iconx2-000000.png
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e04f00, url = https://www.gstatic.com/images/branding/googlelogo/2x/googlelogo_dark_color_84x28dp.png, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://www.gstatic.com/images/branding/googlelogo/2x/googlelogo_dark_color_84x28dp.png
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e04f00, url = https://www.gstatic.com/images/branding/googlelogo/2x/googlelogo_dark_color_84x28dp.png, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://www.gstatic.com/images/branding/googlelogo/2x/googlelogo_dark_color_84x28dp.png
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e05400, url = https://tpc.googlesyndication.com/pagead/images/x_button_blue2.svg, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://tpc.googlesyndication.com/pagead/images/x_button_blue2.svg
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e05900, url = https://www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_left_white_36dp.png, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_left_white_36dp.png
W
/WebKit: ResourceFetcher::determineRevalidationPolicy, 1002, resource = 0x1078e05e00, url = https://www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_right_white_36dp.png, m_isReload = 0, shouldReload = 0
W
/WebKit: ResourceFetcher::requestResource, type = 1, policy = 0, url = https://www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_right_white_36dp.png
W
/System.err: java.net.MalformedURLException: Unknown protocol: about
W
/System.err:     at java.net.URL.<init>(URL.java:182)
W
/System.err:     at java.net.URL.<init>(URL.java:125)
W
/System.err:     at com.android.org.chromium.content.browser.ContentViewCore.adjustSnapScrollIfNeed(ContentViewCore.java:1228)
W
/System.err:     at com.android.org.chromium.content.browser.ContentViewCore.access$1600(ContentViewCore.java:109)
W
/System.err:     at com.android.org.chromium.content.browser.ContentViewCore$3.documentLoadedInFrame(ContentViewCore.java:803)
W
/System.err:     at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
W
/System.err:     at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
W
/System.err:     at android.os.Handler.dispatchMessage(Handler.java:111)
W
/System.err:     at android.os.Looper.loop(Looper.java:194)
W
/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5798)
W
/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W
/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
W
/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1109)
W
/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:875)
W
/chromium: [WARNING:aw_password_handler_delegate_impl.cc(208)] IsSavePasswordEnabled ret is
W
/chromium: [WARNING:password_handler.cc(198)] OnPasswordFormsRendered IsEnabledSavePassword is false

I
/Ads: Scheduling ad refresh 60000 milliseconds from now.
I
/Ads: Ad finished loading.

W
/chromium: [WARNING:registry_controlled_domain.cc(356)] getTopDomain, host = doubleclick.net, topDomain = doubleclick
W
/chromium: [WARNING:registry_controlled_domain.cc(356)] getTopDomain, host = doubleclick.net, topDomain = doubleclick
W
/chromium: [WARNING:registry_controlled_domain.cc(356)] getTopDomain, host = doubleclick.net, topDomain = doubleclick
W
/chromium: [WARNING:registry_controlled_domain.cc(356)] getTopDomain, host = doubleclick.net, topDomain = doubleclick
I
/Ads: Ad is not visible. Not refreshing ad.

I
/Ads: Scheduling ad refresh 60000 milliseconds from now.
I
/Ads: Ad is not visible. Not refreshing ad.
I
/Ads: Scheduling ad refresh 60000 milliseconds from now.
............

The AdMob  banner is still invisible.

There are no any new thoughts ....

Best regards,
Vladimir

понедельник, 16 января 2017 г., 20:50:45 UTC+2 пользователь Vladimir Shestakov написал:
1.PNG

Ivan Bautista (Mobile Ads SDK Team)

unread,
Jan 17, 2017, 7:07:37 AM1/17/17
to Google Mobile Ads SDK Developers
Hi Vladimir,

I was able to load and display ads using your Ad Unit ID  with the sample app. In your sample code, I notice that you are using a string resource named "admob_publisher_id". Can you double check if the value you are passing to the adUnitId property is the Banner Ad Unit ID. Otherwise, an error message should have been thrown.

Best Regards,
Ivan Bautista
Mobile Ads SDK Team


Vladimir Shestakov

unread,
Jan 17, 2017, 1:58:17 PM1/17/17
to Google Mobile Ads SDK Developers
Hi Ivan,

As I said earlier, I also substituted my Ad Unit ID in the test sample application and the banner is visible.
The
same
Ad Unit ID string I used in resources of my app  <string name = "admob_publisher_id"> ca-app-pub-6564422200233347/9589103314 </ string>
My application generally operates without any  errors, but the banner is not visible in all activities.


I don't see in the Log messages that indicate an errorthat effects on the banner output.
What can you say about the Run log.
Is there an error affecting the output of the banner?

Best regards,
Vladimir

понедельник, 16 января 2017 г., 20:50:45 UTC+2 пользователь Vladimir Shestakov написал:
Please help fix the issue
banner in accordance with the instructions, But the banner is not displayed. Log have such messages
Thanks in advance.

Ivan Bautista (Mobile Ads SDK Team)

unread,
Jan 18, 2017, 12:54:48 AM1/18/17
to Google Mobile Ads SDK Developers
Hi Vladimir,

This might be an implementation issue since you were able to load Banner ads using the sample app. Can you send us a miniature sample app/project which contains your own implementation that could reproduce the issue so that we can further investigate because we are having trouble replicating the issue where Ads are not displaying.

Best Regards,
Ivan Bautista
Mobile Ads SDK Team

Vladimir Shestakov

unread,
Jan 18, 2017, 9:48:52 AM1/18/17
to Google Mobile Ads SDK Developers
Hi Ivan.

The problem is fixed.

I moved next code blok from the  onCreate() to the onStart() and Ad Banner  become visible!

MobileAds.initialize(getApplicationContext(), "ca-app-pub-6564422200233347~2881794514");

mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);

Thank you very much for your help.

Best regards,
Vladimir

понедельник, 16 января 2017 г., 20:50:45 UTC+2 пользователь Vladimir Shestakov написал:
Please help fix the issue
banner in accordance with the instructions, But the banner is not displayed. Log have such messages
Thanks in advance.

Swati Pisal

unread,
Jan 8, 2018, 2:27:08 AM1/8/18
to Google Mobile Ads SDK Developers
Hi,
also check height and width of your ad. It should be wrap_content
android:layout_width="wrap_content"
    android:layout_height="wrap_content"

<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
    android:layout_height="wrap_content"
ads:adSize="BANNER"
    ads:adUnitId="ca-app-pub-xxxxxxxxxxxxxxxxxxx/xxxxxxxxxx"
android:layout_alignParentBottom="true"
>
</com.google.android.gms.ads.AdView>

---------------------------------------------------------------------------------------

alpes...@gmail.com

unread,
Aug 6, 2018, 5:11:25 AM8/6/18
to Google Mobile Ads SDK Developers
This issue solved by adding the adview in your our layout file's layout. just find layout from layout in your activity and add the adview in layout that solved.

alpes...@gmail.com

unread,
Aug 6, 2018, 5:13:02 AM8/6/18
to Google Mobile Ads SDK Developers
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lay=(LinearLayout)findViewById(R.id.ad_vi);
MobileAds.initialize(this,"ca-app-pub-3940256099942544/6300978111");
AdView adView=new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId("ca-app-pub-3940256099942544/6300978111");
adView.loadAd(new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build());

lay.addView(adView);
}

On Wednesday, January 18, 2017 at 8:18:52 PM UTC+5:30, Vladimir Shestakov wrote:

mobileadssdk-a...@google.com

unread,
Aug 7, 2018, 1:29:13 AM8/7/18
to alpes...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for your initiative to help out other developers in this forum.

It is indeed true that you should be able to successfully create and add the Banner AdView into your layout programmatically and load the Banner Ad successfully afterwards. That said, regardless if you add the Banner AdView programmatically (like what you've suggested) or via XML layout, you should be able to load ads successfully in both scenarios.

Regards,
Ivan Bautista
Mobile Ads SDK Team




--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/fba72f76-2f10-413a-abd2-821a57ad2866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages