Ad is not shown after enable internet connection.

If run the game without internet and then enable connection, no ad will be shown.
IsReady() always returns false and isInitialized always returns true.
There is only one way to restore showing ad, restart the game with enabled internet connection.

Is there any method to reinitialize the ad engine if the internet connection has been restored after starting game?

Hello geliosoft,

I had the same problem before and found a solution on this topic : Ad not ready and data connection ! - Unity Services - Unity Discussions

Let me know if this can help you !

3 Likes

This is a great solution. Thanks, @Dragonic89 ! We are working to address this in the 2.0 release of Unity Ads, but the release is still several months away. I will also try to incorporate a similar solution into the UnityAdsHelper.

Hi,
I am having the same issue but this post is a year old now. Is this still the best solutuon?

Hi @meuklight , we have addressed this issue with the Ads SDK 2.x series. You don’t need to manually check for connection before initializing Ads SDK

/Rasmus

I still check internet connection like this:

function UpdateInternetConnection()
{
    var w: WWW = new WWW("http://google.com");
    yield w;
    isConnected = w.error == null;
}

function Initialize()
{
    yield UpdateInternetConnection();

    if(!Advertisement.isInitialized)
          Advertisement.Initialize(adID, testMode);
}

function OnApplicationPause(pauseStatus: boolean)
{
    if(!pauseStatus)
        Initialize();
}

Hi Rasmus,
I am using Services window -based integrations in Unity 5.6.1f1, can you instruct how to use Ads SDK 2.x.

It’s written in Knowledge base ‘Unity 5.5+ includes the latest Unity ads version’
but I am getting the issue.

Thanks!

Hi,

I was searching and got this:

Also using the google web page for an internet reachability check might get you in trouble. Such a use case usually counts as misuse of their services:

“Don’t misuse our Services. For example, don’t […] try to access them using a method other than the interface and the instructions that we provide.”

It’s from Google and also Google doesn’t work in China and Russia so it will be a loss of revenue if we use google.com to check internet. I am still doubtful to use my own domain name instead of google.com.

Google work in Russia, but you can check the country and use desired urls.