0

I try to show Unity Ads rewarded placement through mediation on Android device, i figured out that its working on android 8 but when i test it on android 9 then UnityAds.isReady() always returns false.

this is the latest mediation gradle configuration.

implementation 'com.google.ads.mediation:unity:3.4.6.0'

this is my configuration code

//UnityAds.initialize(AdTask.this, AdConfig.UNITY_AD_GAME_ID, unityAdsListener,true);//this approach is depecated
  UnityAds.initialize(AdTask.this,AdConfig.UNITY_AD_GAME_ID,true);
  UnityAds.isInitialized(); // just to making sure that its been initialized
  UnityAdsImplementation.addListener(unityAdsListener);

this is how i try to show the ad

if (UnityAds.isReady(AdConfig.UNITY_AD_NEW_TASK_PLACEMENT_ID)) { 
     UnityAds.show(AdTask.this, AdConfig.UNITY_AD_NEW_TASK_PLACEMENT_ID);
  }

and this is my listener class

private class UnityAdsListener implements IUnityAdsListener {

    @Override
    public void onUnityAdsReady (String placementId) {
        // Implement functionality for an ad being ready to show.
    }

    @Override
    public void onUnityAdsStart (String placementId) {
        // Implement functionality for a user starting to watch an ad.
    }

    @Override
    public void onUnityAdsFinish (String placementId, UnityAds.FinishState finishState) {
        // Implement functionality for a user finishing an ad.
        Log.d("unityad","finished");
        
    }

    @Override
    public void onUnityAdsError (UnityAds.UnityAdsError error, String message) {
        // Implement functionality for a Unity Ads service error occurring.
        Log.d("ERROR","zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"+message);
    }
}

i debugged each steps and found that unity ad gets initialized but ad is not ready to be shown. log has no clue what is happening therefore i am not sharing the logcat. if any of you have experienced this before then i would love to know how you handled this.

avinash
  • 501
  • 2
  • 8
  • 16

1 Answers1

1

I don't know if it's related, But I'm currently working on my game and ads were working fine, today (like 1 hour ago) i tested my game and the ads were not ready no matter what.. perhaps it's a problem with Google ads?

  • Yes, I did not made any changes to my app as well, and test rewarded ads are never ready (they were working last time I tested my app). It's probably a problem with google admob, or ads plugin. Do you still have this issue? – Michał Lorenc Jan 24 '21 at 21:29