0

I have an Android app developed in Android Studio. And I have integrated Unity Ads in my app showing full-screen video Ads.

I have followed each step carefully in their documentation: https://unityads.unity3d.com/help/monetization/integration-guide-android

But the ads are displaying continuously one after another. There is no stopping for this video ads. I am losing users for my app because of this.

Here is my implementation according to their docs in MainActivity.class:

UnityListener unityListener = new UnityListener();
UnityAds.initialize(MainActivity.this, "my_ad_unit_id", unityListener);

private class UnityListener implements IUnityAdsListener {

        @Override
        public void onUnityAdsReady(String s) {
                UnityAds.show(MainActivity.this);
        }

        @Override
        public void onUnityAdsStart(String s) {
        }

        @Override
        public void onUnityAdsFinish(String s, UnityAds.FinishState finishState) {
        }

        @Override
        public void onUnityAdsError(UnityAds.UnityAdsError unityAdsError, String s) {
        }
}
Dileep Perla
  • 1,865
  • 7
  • 33
  • 54
  • Your code shows an ad as soon as an ad is available. If you want to throttle them or have them show because the user clicked or interacted in some way you'll have to hook that up instead. https://github.com/Unity-Technologies/unity-ads-android/blob/master/app/src/main/java/com/unity3d/ads/example/UnityAdsExample.java – Retired Ninja Aug 18 '18 at 05:02
  • Remove this line "UnityAds.show(MainActivity.this);" from onUnityAdsReady method and use this to show ads where you want to show ads. Its recommended to check if ad is loaded and ready or not before calling show method. and its good practice to load next ad as soon as you show ad. Hope this will help you. – Hardik Maru Aug 18 '18 at 07:32

0 Answers0