unity ads isready(rewardedVideo) always false on android, help needed

hello, i’m getting a weird problem, when i have code and tested my ads manager it was working on editor and on my android device.

now i have upgrade to unity 5.5.0 and i’m testing some new behaviors on my game and it is working on the editor but not in my android device, in the editor i get the unity ads test screen that says that there will be an unity video ads and a button to let it close, but in my android device i don’t get anything, i checked and isReady(rewardedVideo) is always false on the android device.

here is my ads manager code

using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;

public class ads_manager : MonoBehaviour {

  int WhereTo = 0;
  Manager wManager;



  void Start () {
     Advertisement.Initialize("1195102", true);
     wManager = GameObject.Find("Game Manager").GetComponent<Manager>();

  }

   
  //ifrom ==>0 restart
  //ifrom ==>1 garage
  public void ShowAD(int iFrom)
  {
     WhereTo = iFrom;
     if (Advertisement.IsReady("rewardedVideo"))
     {
        var options = new ShowOptions { resultCallback = HandleShowAD };
        Advertisement.Show("rewardedVideo", options);
     }
  }

  public void HandleShowAD(ShowResult result)
  {
     switch (result)
     {
        case ShowResult.Finished:
           Debug.Log("The ad was successfully shown.");
           if (WhereTo == 0)
           {
              wManager.ShowEarnedCoins(5);
              wManager.restart();
           }
           if (WhereTo==1)
           {
              wManager.ShowEarnedCoins(5);
              wManager.garage();
           }
           break;
        case ShowResult.Skipped:
           Debug.Log("The ad was skipped before reaching the end.");
           if (WhereTo == 0)
           {
              wManager.ShowEarnedCoins(0);
              wManager.restart();
           }
           if (WhereTo == 1)
           {
              wManager.ShowEarnedCoins(0);
              wManager.garage();
           }
           break;
        case ShowResult.Failed:
           Debug.LogError("The ad failed to be shown.");
           if (WhereTo == 0)
           {
              wManager.ShowEarnedCoins(0);
              wManager.restart();
           }
           if (WhereTo == 1)
           {
              wManager.ShowEarnedCoins(0);
              wManager.garage();
           }
           break;
        }
     }
}

any idead why i’m geting always false on my android device ?

thanks in advance for all the help.

Hi,

When are you running ShowAD? Note that it takes at least a few seconds for Unity Ads to initialise when using live ads. During this time - IsReady returns false. It will return false until Unity Ads has initialised.

A safe approach would be to wait until IsReady() returns true.

I hope this helps!

2 Likes

hello, i’m showing the ads after the player crash his car, after the game over menu, exactly when the player press restart or go to garage, the ads is called.

i think the Unity Ads is initialized because i have an empty game object with my ads_manager attached to it, i think the Start function is called for sure because that script is in an object of the scene, is there a way to know if the Unity Ads are initialized ?

Hello,

I’m also experiencing this with 5.5.0, in editor and on android device.

at my end, without any changes, sometimes work and sometimes not.

still don’t know the reason of this.

same issue here after 1 year

waiting worked…