googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.38k stars 1.08k forks source link

Unity 5 google admobs android banner and interstitial not shown in device whet built .. #241

Closed nothingbuthappend closed 8 years ago

nothingbuthappend commented 8 years ago

hello guys I have a trouble about admob since a week . first I donloaded admob plugins from googleads/googleads-mobile-unity

then opened play servicesresolver right click selected then check resolve client jar in editor wrote succesfully done . used this script for singleton .

using UnityEngine; using System.Collections; using System; using GoogleMobileAds.Api;

public class ReklamScript : MonoBehaviour { private static ReklamScript instance = null;

public string bannerID; public string interstitialID;

public bool testMod = false; public string testDeviceID;

private BannerView bannerReklam; private InterstitialAd interstitialReklam;

void Awake() { if( instance == null ) { instance = this; DontDestroyOnLoad( this ); } else if( this != instance ) { Destroy( gameObject ); return; } }

void Start() { if( this != instance ) return;

BannerReklamAl();
InterstitialReklamAl();

}

void BannerReklamAl() { bannerReklam = new BannerView( bannerID, AdSize.SmartBanner, AdPosition.Top );

AdRequest reklamiAl;
if( testMod )
    reklamiAl = new AdRequest.Builder().AddTestDevice( AdRequest.TestDeviceSimulator )
        .AddTestDevice( testDeviceID ).Build();
else
    reklamiAl = new AdRequest.Builder().Build();

bannerReklam.LoadAd( reklamiAl );
bannerReklam.Hide();

}

void InterstitialReklamAl() { if( interstitialReklam != null ) interstitialReklam.Destroy();

interstitialReklam = new InterstitialAd( interstitialID );
interstitialReklam.OnAdClosed -= InterstitialDelegate;
interstitialReklam.OnAdClosed += InterstitialDelegate;

AdRequest reklamiAl;
if( testMod )
    reklamiAl = new AdRequest.Builder().AddTestDevice( AdRequest.TestDeviceSimulator )
        .AddTestDevice( testDeviceID ).Build();
else
    reklamiAl = new AdRequest.Builder().Build();

interstitialReklam.LoadAd( reklamiAl );

}

public void InterstitialDelegate( object sender, EventArgs args ) { InterstitialReklamAl(); }

/*void OnGUI() { if( GUI.Button( new Rect( Screen.width / 2 - 150, 0, 300, 150 ), "Banner Goster" ) ) ReklamScript.BannerGoster();

if( GUI.Button( new Rect( Screen.width / 2 - 150, 150, 300, 150 ), "Banner Gizle" ) )
    ReklamScript.BannerGizle();

if( GUI.Button( new Rect( Screen.width / 2 - 150, 300, 300, 150 ), "Interstitial Goster" ) )
    ReklamScript.InsterstitialGoster();

} */

public static void BannerGoster() { if( instance == null ) return;

if( instance.bannerReklam == null )
    instance.BannerReklamAl();

instance.bannerReklam.Show();

}

public static void BannerGizle() { if( instance == null ) return;

if( instance.bannerReklam == null )
    return;

instance.bannerReklam.Hide();

}

public static void InsterstitialGoster() { if( instance == null ) return;

if( instance.interstitialReklam == null )
    instance.InterstitialReklamAl();

instance.StopCoroutine( instance.InsterstitialCoroutine() );
instance.StartCoroutine( instance.InsterstitialCoroutine() );

}

IEnumerator InsterstitialCoroutine() { while( !interstitialReklam.IsLoaded() ) yield return null;

interstitialReklam.Show();

}

}

I am calling banner with ReklamScript.BannerGoster (); here is android manifest

package="com.google.unity" android:versionName="1.0" android:versionCode="1"> android:targetSdkVersion="19" />

android:value="@integer/google_play_services_version" />

android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />

android:theme="@style/Theme.IAPTheme"/>

in editor succesfully loading ads .displaying dummy load ad ,etc. but when I built to my device and boom. there is no ads? guys ı finished my app since 10 days but cant implementing ads to my game .. PLS Any help will be appreciated .

rampara commented 8 years ago

Do you have any output in logcat under the "Ads" or "Unity" tags that indicates the cause of ads not loading?

nothingbuthappend commented 8 years ago

hello again sir.I have android studio that installed .my device plugged to dekstop .and in my android studio there is small icon at bottom left named logcat.over it my device shown. but how can I see logcat about google admob I dont know.

nothingbuthappend commented 8 years ago

06-27 16:29:09.689 776-881/? D/StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{f1f5c91 u0 d0 com.sirius.zombierising/com.unity3d.player.UnityPlayerActivity} 06-27 16:29:10.349 1859-1859/? I/cm.log.servpro: [forcestop_listener][D]/ onAccessibilityEvent com.unity3d.player.UnityPlayerActivity, mListened = false 06-27 16:29:10.369 776-930/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{bfa17e6 u0 com.sirius.zombierising/com.unity3d.player.UnityPlayerActivity t9073} time:28096585 06-27 16:29:10.659 13819-13883/? I/AppsFlyer_1.18: WARNING:checkPlatform Not Built using Unity 22. 06-27 16:29:10.869 776-881/? D/StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{f1f5c91 u0 d0 com.sirius.zombierising/com.unity3d.player.UnityPlayerActivity} 06-27 16:29:13.839 13702-13808/? I/AppsFlyer_1.18: WARNING:checkPlatform Not Built using Unity 22.

nothingbuthappend commented 8 years ago

what its mean =?what should I do?

rampara commented 8 years ago

Can you run the command listed below to limit logcat output to the "Ads" and "Unity" tags.

adb logcat Unity:* Ads:* *:S

nothingbuthappend commented 8 years ago

I can probaly look it tomorrow..:( Now im at home.and computer must stay in business. Thx very much .

nothingbuthappend commented 8 years ago

when typed # adb logcat Unity:* Ads:* *:S then gives very long list that seems There is no kind of description about unity and ads .I can not explain what is the problem? so many times say : 06-28 14:40:50.610 8975 9060 I Unity : 06-28 14:40:50.610 8975 9060 I Unity : (Filename: ./artifacts/generated/comm on/runtime/UnityEngineDebugBindings.gen.cpp Line: 37) 06-28 14:40:50.610 8975 9060 I Unity : this problem killing me ..ahh

rampara commented 8 years ago

You can use the adb logcat -c command to clear logcat history before running through your Unity app. This should reduce logcat content. Are you also having trouble getting ads with the sample application?

Everest1986 commented 8 years ago

Hi All, I have similar problem please find my log below. Could anybody help me? Whole week i try to figure it out.

Banner: I/Ads (16645): Starting ad request.

I/Ads (16645): Use AdRequest.Builder.addTestDevice("17F2B8177B4B56D0B45Z78C2D204D7BC") to get test ads on this device.

W/Ads (16645): There was a problem getting an ad response. ErrorCode: 0

W/Ads (16645): Failed to load ad: 0

I/Unity (16645): HandleFailedToReceiveAd event received with message: Internal error

I/Unity (16645): UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

I/Unity (16645): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])

I/Unity (16645): UnityEngine.Logger:Log(LogType, Object)

I/Unity (16645): UnityEngine.Debug:Log(Object)

I/Unity (16645): UnityEngine.MonoBehaviour:print(Object) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineMonoBehaviourBindings.gen.cs:106)

I/Unity (16645): GoogleMobileAdsDemoScript:HandleAdFailedToLoad(Object, AdFailedToLoadEventArgs) (at G:\Admob\Assets\samples\HelloWorld\Assets\GoogleMobileAdsDemoScript.cs:253)

I/Unity (16645): GoogleMobileAds.Api.BannerView:m__8(Object, AdFailedToLoadEventArgs) (at G:\Admob\Assets\GoogleMobileAds\Api\BannerView.cs:45)

I/Unity (16645): GoogleMobileAds.Android.BannerClient:onAdFailedToLoad(String) (at G:\Admob\Assets\GoogleMobileAds\Platforms\Android\BannerClient.cs:86)

I/Unity (16645): System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)

I/Unity (16645): System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[

E/Ads (12275): Failed to connect to https://googleads.g.doubleclick.net/pagead/drt/m. No DSID retrieved.

Interstitial: I/Ads (16645): Starting ad request.

I/Ads (16645): Use AdRequest.Builder.addTestDevice("17F2B8177B4B56D0B45Z78C2D204D7BC") to get test ads on this device.

W/Ads (16645): There was a problem getting an ad response. ErrorCode: 0

W/Ads (16645): Failed to load ad: 0

I/Unity (16645): HandleInterstitialFailedToLoad event received with message: Internal error

I/Unity (16645): UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

I/Unity (16645): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])

I/Unity (16645): UnityEngine.Logger:Log(LogType, Object)

I/Unity (16645): UnityEngine.Debug:Log(Object)

I/Unity (16645): UnityEngine.MonoBehaviour:print(Object) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineMonoBehaviourBindings.gen.cs:106)

I/Unity (16645): GoogleMobileAdsDemoScript:HandleInterstitialFailedToLoad(Object, AdFailedToLoadEventArgs) (at G:\Admob\Assets\samples\HelloWorld\Assets\GoogleMobileAdsDemoScript.cs:287)

I/Unity (16645): GoogleMobileAds.Api.InterstitialAd:m__12(Object, AdFailedToLoadEventArgs) (at G:\Admob\Assets\GoogleMobileAds\Api\InterstitialAd.cs:44)

I/Unity (16645): GoogleMobileAds.Android.InterstitialClient:onAdFailedToLoad(String) (at G:\Admob\Assets\GoogleMobileAds\Platforms\Android\InterstitialClient.cs:99)

I/Unity (16645): System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)

I/Unity (16645): System.Reflection.MonoMethod:In

rampara commented 8 years ago

@Everest1986 are you unable to receive test ads with the sample application from this repository?

Everest1986 commented 8 years ago

Yes, please find below sample application source witch my adds ID:

using System;
using UnityEngine;
using GoogleMobileAds;
using GoogleMobileAds.Api;

public class GoogleMobileAdsDemoHandler : IDefaultInAppPurchaseProcessor
{
    private readonly string[] validSkus = { "android.test.purchased" };

    //Will only be sent on a success.
    public void ProcessCompletedInAppPurchase(IInAppPurchaseResult result)
    {
        result.FinishPurchase();
        GoogleMobileAdsDemoScript.OutputMessage = "Purchase Succeeded! Credit user here.";
    }

    //Check SKU against valid SKUs.
    public bool IsValidPurchase(string sku)
    {
        foreach(string validSku in validSkus)
        {
            if (sku == validSku)
            {
                return true;
            }
        }
        return false;
    }

    //Return the app's public key.
    public string AndroidPublicKey
    {
        //In a real app, return public key instead of null.
        get { return null; }
    }
}

// Example script showing how to invoke the Google Mobile Ads Unity plugin.
public class GoogleMobileAdsDemoScript : MonoBehaviour
{

    private BannerView bannerView;
    private InterstitialAd interstitial;
    private RewardBasedVideoAd rewardBasedVideo;
    private float deltaTime = 0.0f;
    private static string outputMessage = "";

    public static string OutputMessage
    {
        set { outputMessage = value; }
    }

    void Start()
    {
        // Get singleton reward based video ad reference.
        rewardBasedVideo = RewardBasedVideoAd.Instance;

        // RewardBasedVideoAd is a singleton, so handlers should only be registered once.
        rewardBasedVideo.OnAdLoaded += HandleRewardBasedVideoLoaded;
        rewardBasedVideo.OnAdFailedToLoad += HandleRewardBasedVideoFailedToLoad;
        rewardBasedVideo.OnAdOpening += HandleRewardBasedVideoOpened;
        rewardBasedVideo.OnAdStarted += HandleRewardBasedVideoStarted;
        rewardBasedVideo.OnAdRewarded += HandleRewardBasedVideoRewarded;
        rewardBasedVideo.OnAdClosed += HandleRewardBasedVideoClosed;
        rewardBasedVideo.OnAdLeavingApplication += HandleRewardBasedVideoLeftApplication;
    }

    void Update()
    {
        // Calculate simple moving average for time to render screen. 0.1 factor used as smoothing
        // value.
        deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
    }

    void OnGUI()
    {
        GUIStyle style = new GUIStyle();

        Rect rect = new Rect(0, 0, Screen.width, Screen.height);
        style.alignment = TextAnchor.LowerRight;
        style.fontSize = (int)(Screen.height * 0.06);
        style.normal.textColor = new Color(0.0f, 0.0f, 0.5f, 1.0f);
        float fps = 1.0f / deltaTime;
        string text = string.Format("{0:0.} fps", fps);
        GUI.Label(rect, text, style);

        // Puts some basic buttons onto the screen.
        GUI.skin.button.fontSize = (int)(0.03f * Screen.height);

        Rect requestBannerRect = new Rect(0.1f * Screen.width, 0.05f * Screen.height,
                                     0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(requestBannerRect, "Request Banner"))
        {
            RequestBanner();
        }

        Rect showBannerRect = new Rect(0.1f * Screen.width, 0.175f * Screen.height,
                                  0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(showBannerRect, "Show Banner"))
        {
            bannerView.Show();
        }

        Rect destroyBannerRect = new Rect(0.1f * Screen.width, 0.3f * Screen.height,
                                     0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(destroyBannerRect, "Destroy Banner"))
        {
            bannerView.Destroy();
        }

        Rect requestInterstitialRect = new Rect(0.1f * Screen.width, 0.425f * Screen.height,
                                           0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(requestInterstitialRect, "Request Interstitial"))
        {
            RequestInterstitial();
        }

        Rect showInterstitialRect = new Rect(0.1f * Screen.width, 0.55f * Screen.height,
                                        0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(showInterstitialRect, "Show Interstitial"))
        {
            ShowInterstitial();
        }
/*
        Rect requestRewardedRect = new Rect(0.1f * Screen.width, 0.675f * Screen.height,
                                       0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(requestRewardedRect, "Request Rewarded Video"))
        {
            RequestRewardBasedVideo();
        }

        Rect showRewardedRect = new Rect(0.1f * Screen.width, 0.8f * Screen.height,
                                    0.8f * Screen.width, 0.1f * Screen.height);
        if (GUI.Button(showRewardedRect, "Show Rewarded Video"))
        {
            ShowRewardBasedVideo();
        }
        */
        Rect textOutputRect = new Rect(0.1f * Screen.width, 0.925f * Screen.height,
                                  0.8f * Screen.width, 0.05f * Screen.height);
        GUI.Label(textOutputRect, outputMessage);
    }

    private void RequestBanner()
    {
        #if UNITY_EDITOR
            string adUnitId = "unused";
#elif UNITY_ANDROID
            string adUnitId = "ca-app-pub-7875398596727009/9705603172";
#elif (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
            string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
            string adUnitId = "unexpected_platform";
#endif

        // Create a 320x50 banner at the top of the screen.
        bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
        // Register for ad events.
        bannerView.OnAdLoaded += HandleAdLoaded;
        bannerView.OnAdFailedToLoad += HandleAdFailedToLoad;
        bannerView.OnAdLoaded += HandleAdOpened;
        bannerView.OnAdClosed += HandleAdClosed;
        bannerView.OnAdLeavingApplication += HandleAdLeftApplication;
        // Load a banner ad.
        bannerView.LoadAd(createAdRequest());
    }

    private void RequestInterstitial()
    {
        #if UNITY_EDITOR
            string adUnitId = "unused";
#elif UNITY_ANDROID
            string adUnitId = "ca-app-pub-7875398596727009/1543207972";
#elif (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
            string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
#else
            string adUnitId = "unexpected_platform";
#endif

        // Create an interstitial.
        interstitial = new InterstitialAd(adUnitId);
        // Register for ad events.
        interstitial.OnAdLoaded += HandleInterstitialLoaded;
        interstitial.OnAdFailedToLoad += HandleInterstitialFailedToLoad;
        interstitial.OnAdOpening += HandleInterstitialOpened;
        interstitial.OnAdClosed += HandleInterstitialClosed;
        interstitial.OnAdLeavingApplication += HandleInterstitialLeftApplication;
        // Load an interstitial ad.
        interstitial.LoadAd(createAdRequest());
    }

    // Returns an ad request with custom ad targeting.
    private AdRequest createAdRequest()
    {
        return new AdRequest.Builder()
                .AddTestDevice(AdRequest.TestDeviceSimulator)
                //.AddTestDevice("0123456789ABCDEF0123456789ABCDEF")
                //.AddKeyword("game")
                //.SetGender(Gender.Male)
                //.SetBirthday(new DateTime(1985, 1, 1))
                //.TagForChildDirectedTreatment(false)
                //.AddExtra("color_bg", "9B30FF")
                .Build();
    }

    private void RequestRewardBasedVideo()
    {
        #if UNITY_EDITOR
            string adUnitId = "unused";
        #elif UNITY_ANDROID
            string adUnitId = "INSERT_ANDROID_REWARD_BASED_VIDEO_AD_UNIT_ID_HERE";
        #elif (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
            string adUnitId = "INSERT_IOS_REWARD_BASED_VIDEO_AD_UNIT_ID_HERE";
        #else
            string adUnitId = "unexpected_platform";
        #endif

        rewardBasedVideo.LoadAd(createAdRequest(), adUnitId);
    }

    private void ShowInterstitial()
    {
        if (interstitial.IsLoaded())
        {
            interstitial.Show();
        }
        else
        {
            print("Interstitial is not ready yet.");
        }
    }

    private void ShowRewardBasedVideo()
    {
        if (rewardBasedVideo.IsLoaded())
        {
            rewardBasedVideo.Show();
        } else
        {
            print("Reward based video ad is not ready yet.");
        }
    }

    #region Banner callback handlers

    public void HandleAdLoaded(object sender, EventArgs args)
    {
        print("HandleAdLoaded event received.");
    }

    public void HandleAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    {
        print("HandleFailedToReceiveAd event received with message: " + args.Message);
    }

    public void HandleAdOpened(object sender, EventArgs args)
    {
        print("HandleAdOpened event received");
    }

    void HandleAdClosing(object sender, EventArgs args)
    {
        print("HandleAdClosing event received");
    }

    public void HandleAdClosed(object sender, EventArgs args)
    {
        print("HandleAdClosed event received");
    }

    public void HandleAdLeftApplication(object sender, EventArgs args)
    {
        print("HandleAdLeftApplication event received");
    }

    #endregion

    #region Interstitial callback handlers

    public void HandleInterstitialLoaded(object sender, EventArgs args)
    {
        print("HandleInterstitialLoaded event received.");
    }

    public void HandleInterstitialFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    {
        print("HandleInterstitialFailedToLoad event received with message: " + args.Message);
    }

    public void HandleInterstitialOpened(object sender, EventArgs args)
    {
        print("HandleInterstitialOpened event received");
    }

    void HandleInterstitialClosing(object sender, EventArgs args)
    {
        print("HandleInterstitialClosing event received");
    }

    public void HandleInterstitialClosed(object sender, EventArgs args)
    {
        print("HandleInterstitialClosed event received");
    }

    public void HandleInterstitialLeftApplication(object sender, EventArgs args)
    {
        print("HandleInterstitialLeftApplication event received");
    }

    #endregion

    #region RewardBasedVideo callback handlers

    public void HandleRewardBasedVideoLoaded(object sender, EventArgs args)
    {
        print("HandleRewardBasedVideoLoaded event received.");
    }

    public void HandleRewardBasedVideoFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    {
        print("HandleRewardBasedVideoFailedToLoad event received with message: " + args.Message);
    }

    public void HandleRewardBasedVideoOpened(object sender, EventArgs args)
    {
        print("HandleRewardBasedVideoOpened event received");
    }

    public void HandleRewardBasedVideoStarted(object sender, EventArgs args)
    {
        print("HandleRewardBasedVideoStarted event received");
    }

    public void HandleRewardBasedVideoClosed(object sender, EventArgs args)
    {
        print("HandleRewardBasedVideoClosed event received");
    }

    public void HandleRewardBasedVideoRewarded(object sender, Reward args)
    {
        string type = args.Type;
        double amount = args.Amount;
        print("HandleRewardBasedVideoRewarded event received for " + amount.ToString() + " " +
                type);
    }

    public void HandleRewardBasedVideoLeftApplication(object sender, EventArgs args)
    {
        print("HandleRewardBasedVideoLeftApplication event received");
    }

    #endregion
rampara commented 8 years ago

@Everest1986 Using the code from your post above, I'm able to request and display ads without issue. Can you post a Charles log of your ad request? It may help narrow down what's causing the issue you're seeing.

Everest1986 commented 8 years ago

I don't know why but it working now :P Thank you for your time. (mistake)

Funny thing when I use Charles and set proxy setting (8888) on device I see adds on my device. Unfortunately when I use 4G or my standard network without proxy setting I have "network error".

I found this in LogCat:

Error while connecting to ad server: failed to connect to googleads.g.doubleclick.net/127.0.0.1 (port 443) after 60000ms: isConnected failed: ECONNREFUSED (Connection refused)

rampara commented 8 years ago

Glad you were able to get it working.

ChaimHong commented 7 years ago

Hi All, I have similar problem please find my log below. Could anybody help me? Whole week i try to figure it out.

`I/Ads: Starting ad request. I/Ads: No fill from ad server. W/Ads: Failed to load ad: 3 I/Unity: HandleNativeExpressAdFailedToReceiveAd event received with message: No fill

     (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

D/AdsUnity: Calling destroy() on NativeExpressAdView I/Ads: Starting ad request. W/Ads: There was a problem getting an ad response. ErrorCode: 0 W/Ads: Failed to load ad: 0 I/Unity: HandleRewardBasedVideoFailedToLoad event received with message: Internal error

     (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)`

when i click the native ads / rewardedvideo !

rampara commented 7 years ago

@ChaimHong Are banners and interstitials loading correctly for you or do all ad formats fail to load?

Everest1986 commented 7 years ago

@ChaimHong Did you use some Xiaomi device to test ads ?

ChaimHong commented 7 years ago

@rampara just interstitials/rewardvideo fail

ChaimHong commented 7 years ago

@rampara @Everest1986 now all ad formats success to load

rampara commented 7 years ago

Glad you were able to get everything working.

bee0806 commented 7 years ago

hello there i have similar problem too. All of the ads fail to load. I've already test the sample application from this repository, but the result is same. the ads didn't show. here is my logcat :

I/Ads (10554): Use AdRequest.Builder.addTestDevice("6D1C6289F7A2F34B0B0E8C8938B79C43") to get test ads on this device. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. W/Ads (21552): Timed out waiting for ad response. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. W/Ads (21552): Failed to load ad: 2 W/Ads (10554): Timed out waiting for ad response. I/Ads (10554): Scheduling ad refresh 60000 milliseconds from now. W/Ads (10554): Failed to load ad: 2 I/Unity (10554): HandleFailedToReceiveAd event received with message: Network Error I/Unity (10554):
I/Unity (10554): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37) I/Unity (10554): I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (10554): Starting ad request. I/Ads (10554): Use AdRequest.Builder.addTestDevice("6D1C6289F7A2F34B0B0E8C8938B79C43") to get test ads on this device. I/Ads (10554): Starting ad request. I/Ads (10554): Use AdRequest.Builder.addTestDevice("6D1C6289F7A2F34B0B0E8C8938B79C43") to get test ads on this device. I/Unity (10554): Interstitial is not ready yet I/Unity (10554):
I/Unity (10554): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37) I/Unity (10554): I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. I/Ads (21552): Ad is not visible. Not refreshing ad. I/Ads (21552): Scheduling ad refresh 60000 milliseconds from now. W/Ads (10554): Timed out waiting for ad response. I/Ads (10554): Scheduling ad refresh 60000 milliseconds from now. W/Ads (10554): Failed to load ad: 2 I/Unity (10554): HandleFailedToReceiveAd event received with message: Network Error I/Unity (10554):
I/Unity (10554): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

rampara commented 7 years ago

@bee0806 You seem to be running into network errors. Does the device you're testing with have full network connectivity?

bee0806 commented 7 years ago

@rampara so the problem is the network. i wonder, does admob need strong network connection?. my network working fine with browsing and downloading or it just need stable connection?.

rampara commented 7 years ago

The likely cause of the error you'e seeing is a timeout in receiving an ad response from the AdMob ad server. This timeout is probably more aggressive than the ones used by the apps you're using for browsing.

bee0806 commented 7 years ago

thanks @rampara it make me clear now. i'll check it out and try it with other connection. thanks for the supports.

rampara commented 7 years ago

Glad to be of help.