0
\$\begingroup\$

I've been trying to get Rewarded Ads in my app using Admobs and Unity Ads. I followed the official documentation and did all they have told.However when debugging using the Admobs mediation suite I get this error with the Adapter Intialization.

Error Screen

Here is the code I am using to Initiialize

   public void Start()
    {
        string gameId = "*******";
        bool testMode = true;
        Advertisement.AddListener(this);

        Advertisement.Initialize(gameId, testMode);

        List<String> deviceIds = new List<String>() { AdRequest.TestDeviceSimulator };

        // Add some test device IDs (replace with your own device IDs).
#if UNITY_IPHONE
        deviceIds.Add("***");
#elif UNITY_ANDROID
        deviceIds.Add("***");
#endif

        // Configure TagForChildDirectedTreatment and test device IDs.
        RequestConfiguration requestConfiguration =
            new RequestConfiguration.Builder()
            .SetTagForChildDirectedTreatment(TagForChildDirectedTreatment.Unspecified)
            .SetTestDeviceIds(deviceIds).build();

        MobileAds.SetRequestConfiguration(requestConfiguration);

        // Initialize the Google Mobile Ads SDK.
        //MobileAds.Initialize(HandleInitCompleteAction);


        MobileAds.Initialize((initStatus) =>
        {
            Dictionary<string, AdapterStatus> map = initStatus.getAdapterStatusMap();
            foreach (KeyValuePair<string, AdapterStatus> keyValuePair in map)
            {
                string className = keyValuePair.Key;
                AdapterStatus status = keyValuePair.Value;
                switch (status.InitializationState)
                {
                    case AdapterState.NotReady:
                        // The adapter initialization did not complete.
                        MonoBehaviour.print("Adapter: " + className + " not ready.");
                        break;
                    case AdapterState.Ready:
                        // The adapter was successfully initialized.
                        MonoBehaviour.print("Adapter: " + className + " is initialized.");
                        break;
                }
            }
        }); 



        ShowMediationTestSuite();
        MediationTestSuite.OnMediationTestSuiteDismissed += this.HandleMediationTestSuiteDismissed;

    }

Would highly appreciate if you could help me figure this out.

EDIT: This is the output I get from Logcat;

12-26 17:26:38.256 8667-8728/? E/Unity: NotImplementedException: The method or operation is not implemented.
      at GoogleAdMobController.OnUnityAdsReady (System.String placementId) [0x00000] in <742bdb1de5484cab867bf696a64fb6c2>:0 
      at UnityEngine.Advertisements.Platform.Platform+<UnityAdsReady>c__AnonStorey2.<>m__0 () [0x0002b] in <0d32a0cebf924ac1aff932756eaa8353>:0 
      at UnityEngine.Advertisements.Utilities.CoroutineExecutor.Update () [0x00021] in <0d32a0cebf924ac1aff932756eaa8353>:0 
     
    (Filename: <742bdb1de5484cab867bf696a64fb6c2> Line: 0)
12-26 17:26:38.296 8667-8728/? E/Unity: NotImplementedException: The method or operation is not implemented.
      at GoogleAdMobController.OnUnityAdsReady (System.String placementId) [0x00000] in <742bdb1de5484cab867bf696a64fb6c2>:0 
      at UnityEngine.Advertisements.Platform.Platform+<UnityAdsReady>c__AnonStorey2.<>m__0 () [0x0002b] in <0d32a0cebf924ac1aff932756eaa8353>:0 
      at UnityEngine.Advertisements.Utilities.CoroutineExecutor.Update () [0x00021] in <0d32a0cebf924ac1aff932756eaa8353>:0 
     
    (Filename: <742bdb1de5484cab867bf696a64fb6c2> Line: 0)
12-26 17:26:38.336 8667-8728/? E/Unity: NotImplementedException: The method or operation is not implemented.
      at GoogleAdMobController.OnUnityAdsReady (System.String placementId) [0x00000] in <742bdb1de5484cab867bf696a64fb6c2>:0 
      at UnityEngine.Advertisements.Platform.Platform+<UnityAdsReady>c__AnonStorey2.<>m__0 () [0x0002b] in <0d32a0cebf924ac1aff932756eaa8353>:0 
      at UnityEngine.Advertisements.Utilities.CoroutineExecutor.Update () [0x00021] in <0d32a0cebf924ac1aff932756eaa8353>:0 
     
    (Filename: <742bdb1de5484cab867bf696a64fb6c2> Line: 0)
12-26 17:27:10.356 8667-8667/? I/Ads: This request is sent from a test device.
12-26 17:27:12.116 2312-1195/? I/Ads: SDK version: afma-sdk-a-v204204999.203404000.1
12-26 17:27:12.126 2312-1195/? I/Ads: HTTP timeout: 60000 milliseconds.
12-26 17:27:13.146 8667-8667/? D/UnityMediationAdapter: Unity Ads successfully initialized, can now load rewarded ad for placement ID 'nitro_earn' in game '3950973'.
12-26 17:27:33.176 8667-8667/? I/Ads: Ad failed to load : 0
12-26 17:27:43.156 8667-8667/? W/UnityMediationAdapter: 102: UnityAds failed to load for placement ID: nitro_earn
\$\endgroup\$
2
  • \$\begingroup\$ Presumably you checked your setup and system logs as directed by the error message. What did you find? \$\endgroup\$ – DMGregory Dec 26 '20 at 11:05
  • \$\begingroup\$ @DMGregory Thanks for your response....I have added the output I get from Logcat in my edit.....Seems like the Unity Ad Loads but for some reason there is some hidden error I can't quite catch.... \$\endgroup\$ – AfiJaabb Dec 26 '20 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.