Android admob error

Discussion in 'GameMaker Studio 2 Community Tech Support' started by duran can, Sep 1, 2019.

  1. duran can

    duran can Member

    Joined:
    Sep 1, 2019
    Posts:
    3
    Hi, im using gms2 android my ads not working can anyone help please?

    • 09-01 13:27:51.643 3113 3489 W Ads : Not retrying to fetch app settings
    • 09-01 13:27:51.652 3113 3113 I Ads : This request is sent from a test device.
    • 09-01 13:27:51.662 23359 2553 W Ads : Received error HTTP response code: 400
    • 09-01 13:27:51.666 3113 3113 I yoyo : Banner Ad onAdFailedToLoad
    • 09-01 13:27:51.666 3113 3113 I Ads : Ad failed to load : 0
    my code:

    if os_type == os_ios
    {
    app_id = "ca-app-pub-1962396518736721~6906349236";
    banner_id = "ca-app-pub-1962396518736721/8957797502";
    interstitial_id = "ca-app-pub-1962396518736721/2494113895";
    rewarded_id = "ca-app-pub-1962396518736721/9313020726";
    }
    else
    {
    app_id = "ca-app-pub-1962396518736721~6906349236";
    banner_id = "ca-app-pub-1962396518736721/8957797502";
    interstitial_id = "ca-app-pub-1962396518736721/2494113895";
    rewarded_id = "ca-app-pub-1962396518736721/9313020726";
    }
    GoogleMobileAds_UseTestAds(true, "2D3B34BB2F894D9D07C42CFF12B4B8D6");
    GoogleMobileAds_Init(interstitial_id, app_id);
    GoogleMobileAds_LoadInterstitial();
    interstitial_loaded = false;
    GoogleMobileAds_AddBanner(banner_id, GoogleMobileAds_Banner);
     
  2. duran can

    duran can Member

    Joined:
    Sep 1, 2019
    Posts:
    3
    no help ?
     
  3. Override_X

    Override_X Member

    Joined:
    Jun 2, 2018
    Posts:
    21
    So. That code appears to be what you would put in the game start or create event of your ad-serving object. What does your async -social code look like?
     
  4. duran can

    duran can Member

    Joined:
    Sep 1, 2019
    Posts:
    3
    this code from here: https://help.yoyogames.com/hc/en-us/articles/360002971751-iOS-and-Android-Google-Mobile-Ads-Setup
    #async-social event

    var _id = async_load[? "id"];
    if _id == GoogleMobileAds_ASyncEvent
    {
    var ident = async_load[? "type"];
    switch (ident)
    {
    case "banner_load":
    if async_load[? "loaded"] == 1
    {
    var _bw = GoogleMobileAds_BannerGetWidth();
    var _bh = GoogleMobileAds_BannerGetHeight();
    var _hh = display_get_height();
    var _ww = display_get_width();
    GoogleMobileAds_MoveBanner((_ww / 2) - (_bw / 2), _hh - _bh);
    }
    break;
    }
    }

    EDİT: When i add GoogleMobileAds_ShowBanner ads showing . Facepalm.
     
    Last edited: Sep 1, 2019
    Override_X likes this.
  5. Override_X

    Override_X Member

    Joined:
    Jun 2, 2018
    Posts:
    21
    Lol. Glad you got it working.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice