IUnityAdsListener Is not getting callbacks

Alright then after making a new project and starting from scratch, I found that I was using the enablePerPlacementLoad flag from the Advertisement.Initialize().
I have no idea when or why I was using it, maybe from some old documentation…:eyes:
Reviewed one more time this page : Unity developer integration guides
And it doesn’t even mentions about it all anymore…

Anyway then something like this :

Advertisement.Initialize("myID", true, true);

…will simply disable every callback from the listener.

with Unity Ads 3.4.6 and 3.4.7, the IUnityAdsListener still is not working :frowning:

you guys really sure that you already fixed it with 3.4.2 version???

having the same issue with 3.4.7, Unity 2019.4.1f, on iOS with AdMob also initialized.
With AdMob not initialized callbacks work and on Android callbacks work, but iOS with AdMob they don’t.

Same problem. IUnityAdsListener still is not working.
Unity Ads : v3.4.7
Unity : 2018.4.24f1

Advertisement.AddListener(this);
(Error CS1503 Argument 1: Cannot convert from “MyScript” to “UnityEngine.Advertisements.IUnityAdsListener”.)
Unity Ads : v3.4.9
Unity : 2019.2.15f1

I found the error, need to add an interface:
public class MyScript : MonoBehaviour, IUnityAdsListener
{…

Unity 2020.1.3f1
Unit Ads 3.4.9

I have implemented IUnityAdsListener code - is almost identical to sample code?

Callbacks not firing in editor or on device.(android)

UPDATE:

ok i was just being an idiot and forgot to add:
Advertisement.AddListener (this);

because for some reason i assumed implementing the interface would subscribe to callbacks implicitly.

2 Likes

I m getting error after Unity rewardvideo completion and also the rewardvideo complete callback is not called.
Using Unity-2019.4.10f1 and package for Advertisement is 3.4.9.

Error :

UnityException: Find can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
at UnityEngine.Advertisements.Utilities.UnityLifecycleManager.Initialize () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Advertisements.Utilities.UnityLifecycleManager.Post (System.Action action) [0x00000] in <00000000000000000000000000000000>:0
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, System.IntPtr jmethodName, System.IntPtr jargs) [0x00000] in <00000000000000000000000000000000>:0
Rethrow as TargetInvocationException: UnityEngine.Advertisements.Platform.Android.AndroidPlatform.onUnityAdsReady(System.String)
at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, System.IntPtr jmethodName, System.IntPtr jargs) [0x00000] in <00000000000000000000000000000000>:0

(Filename: currently not available on il2cpp Line: -1)

problem: Rewardvideo/Interstitial result is not coming. so i am unable to give rewards to user or hide some object on screen.

NOTE :
i already submitted 2 or more version with unity ads. but at this time i added other monetization like Ironsource. then this error started.

  • Both package for advertisement and UnityEditor version are same as previous successful build.
  • I am using Services window to add advertisement package and I have tried many time by remove and add package again but nothing happened.
public class UnityAdsManager : Singleton<UnityAdsManager>, IUnityAdsListener
    {
        private void Start()
        {
            Initialize();
        }

        public void Initialize()
        {
            MyLogger.Log(this, "Initialize Called...");
            string GameID = "12123132";

            Advertisement.AddListener(this);
            Advertisement.Initialize(GameID, ApplicationDataHelper.IsDebugMode);
            Advertisement.debugMode = ApplicationDataHelper.IsDebugMode;
        }
}

My friend you are a life saver THANK YOU, your comment is the ONLY documentation, where this line of code exists, thank you!

Seems that creating a static ads listener may help. It’s just my experience.