Unity Ads Not Showing In Nexus 5 Android 6.0.1

I have implemented Unity Ads in my game and its showing test ads perfectly fine in many devices such as Xiaomi Mi 4 LTE(Android 6.0.1), Galaxy S2 (4.1.2) and Xiaomi Redmi 2 Prime (Android 5.1.1), Xiaomi Mi Pad 2 (Android 5.1) etc. But its not showing Ads in Nexus 5 (Android 6.0.1). The Unity Version I’m using is Unity 5.3.4f1.
Here is the code that I have used in my game:

public void ShowRewardedAd()
    {
        Debug.Log("Rewarded Ad 1 "+Advertisement.IsReady("rewardedVideo"));
        if (Advertisement.IsReady("rewardedVideo"))
        {
            Debug.Log("Rewarded Ad");
            var options = new ShowOptions { resultCallback = HandleShowResult };
            Advertisement.Show("rewardedVideo", options);
          
        }
    }

    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
            case ShowResult.Finished:
               Debug.Log("The ad was successfully shown.");
                break;
            case ShowResult.Skipped:
                Debug.Log("The ad was skipped before reaching the end.");
                break;
            case ShowResult.Failed:
                Debug.LogError("The ad failed to be shown.");
                break;
        }
    }
    public void showInterstitialAd()
    {
        Debug.Log("Called Unity Ad Function "+Advertisement.IsReady());
        if (Advertisement.IsReady())
        {
            Advertisement.Show();
        }
    }

In Nexus 5, Advertisement.IsReady() is always giving false. So Advertisement is not showing in Nexus 5, where as in other tested devices mentioned above, it is always giving true for the same app apk. All the devices are connected to the same WiFI network. Still Ad is not loading in Nexus 5. I have checked the logcat and can’t find any particular error for the Unity Ads when running in Nexus 5. Can someone please help me in this issue. Is this any bug in the UnityAds?

Would expect device log (logcat) to have the relevant information. Can you post that?

/Rasmus

Here is the Logcat log from Nexus 5.

12-28 13:07:03.694: I/Unity(11436): Called Unity Ad Function False.
Note that this is the line where Advertisement.IsReady() is giving false in Nexus 5.

Hi, I have posted the logcat log from the Nexus 5, after playing my game. Can you please check it.

Correct, not much useful information in that one.

I’m looking for something like following info in log:

You can filter Unity Ads relevant log message by using

/Rasmus

I’m using the automatic initialization of unity ads. So no separate initialization code is given in my game.

Its mentioned in this link that, Unity developer integration guides

. I have enabled Ads through the Services Window. So is it because of that, these logs given below are not showing in my game log in logcat?

I have also reported this issue via Unity and the link is given below. Hope it will be helpful for solving this issue.
https://fogbugz.unity3d.com/default.asp?865363

Thanks, I’ll take a look at the reported bug. However the posted log entries above was also from a project using engine Ads SDK integration.

And for future, when posting links to Fogbugz tickets, don’t include the part after the underscore, as this is an authentication token which gives anyone with that link access to e.g. files on the bug report. Perhaps we need to make this more clear than just “Note that sharing it will also share all your other cases and email conversations in them.” in the automated mail :slight_smile:

/Rasmus

Oops. Sorry. I didn’t think that it was an authentication token. I didn’t have experience in sharing the Fogbugz tickets. So that’s why it happened. Thanks for reminding me the consequences of it. Thanks for editing my reply too… Can you please check about this issue, as my game needs to be published soon.

Thanks.

Sorry, couldn’t find any relevant information in that Fogbugz ticket.

Could you please try to run

And verify that the log contains the “Initializing Unity Ads (…)” part. Alternatively somehow give us access to your project or apk file, so we can test here.

Thanks,
Rasmus

Hi,

I have uploaded the project to Google Drive and here is the link of it.
https://goo.gl/akvQAz

Can you please check it…

Its a test project created for demonstration. In that, in Nexus 5, the following screen is shown:


where as in other devices, this is shown.

Please note, that I have waited for more than 1 hour, still Ad is not ready in Nexus 5. where as in other devices, it usually takes less than 30 seconds to show that Ad is ready. So its not the issue of internet also. I hope this will help you.

Thanks

Also I got an error in the logcat like this:

This error was not seen in the original project.

Thanks for the updated logfile. In any case, since you are using older version of SDK (“sdkVersion=1506” = 1.5), I would recommend that you upgrade to SDK 2.0, in one of following ways:

Please let us know if upgrading to latest Unity/SDK version solves the issue.

/Rasmus

Thanks. It worked. I had integrated Unity Ads SDK 2.0 to my project having Unity 5.3.4 and Ads are now showing fine in Nexus 5. Thanks again for the help… :slight_smile:

1 Like

Good. Thanks for the feedback.

/Rasmus

Thanks guys, was running into this issue today, and this saved me a lot of headache. I wish I can upgrade to 5.5, but still waiting on the 5.5.1 release to ensure some stability before publishing our game.

After updating the project with the asset store package, it seems that that UNITY_ADS define is no longer available? What is the best approach to check if the current platform supports ads?

(NOTE: I’m using NGUI in my project, and it seems that NGUI overrides the project’s platform dependent defines and assigns the define NGUI there. Perhaps it is causing issues…?)

For those scratching their heads like me on how to upgrade to Unity Ads 2.0 on previous Unity versions (pre-5.5.0), see the link below. Basically, you have to take a step back from the automatic initialization and follow the guide for a manual integration:

http://unityads.unity3d.com/help/monetization/2.0-upgrade-guide-unity

Is there any issue with the Unity Ads server? Today I’m not getting any test ads on my all devices. Ads are shown only once or twice when tested several times in many devices…