Admob can't show !

  • kskull41196
    Likes 0

    Problem Description

    Hi guys. I just started using Sonar Helper today and get the problem. I use Admob banner for my android apps manytimes and I compared my code with Sonar Helper code. The results is they are asame. But my problem is when I use Sonar Helper to show admob banner (just admob banner), it can’t be visibility (but I can touch it and turn on the browser) and I need to press device’s home button then resume to my App → admob will be visibility. Does anyone have the same problem?

    P/s: I’ve already try to delay 3 seconds before show admob banner also try to call the ShowAdmobBanner function 2 times at the moment. Thanks in advance for your respone.

  • Sonar Systems admin
    Likes 0

    Could you show us the code you are using to show ad banners also what version of Cocos Helper do you have?

  • kskull41196
    Likes 0

    Here is the code:  SonarCocosHelper::AdMob::showBannerAd(SonarCocosHelper::AdBannerPosition::eBoth);  (I use the lastest version of SonarHelper, I just downloaded it this morning).

    AdmobInstitial works fine but Admobbanner does not. You need to check it. I just found the solution.

    1/ I try turnning off the code HideBannerAd in your AdMobAds.java then all things work great. So I think the problem only occurs when I hide admob before the ads could be loaded.

    2/ I use a ads listener to make sure the banner_ads would be loaded then hide it.

        top_banner_adView = new AdView(activity);

            top_banner_adView.setAdSize(AdSize.BANNER);

            top_banner_adView.setAdUnitId(banner_id_top);

            top_banner_adView.setAdListener(new AdListener() {

                 public void onAdLoaded()

                  {

                     HideBannerAd(TOP);

                  }

            });

    3/ My friend has the same problem so I think it because of SonarHelper. Anyway, the problem is solved, I hope you will check and fix it. Thank you very much for your respone.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    We will take a look into this.

Login to reply