Search code examples
revmobrevmobads

RevMob no ads are displayed


I just update revmob with the last sdk (7.3.2) for Unity. I'm using Unity 4.5 Pro. Everything seems to work fine except that the ads isn't displayed. The debug say that the banner ad is displayed...but there is nothing on the screen and nothing to click either....Also I never get any Eula Popup at the launch of the game.

I think that I didn't missed anything in the doc (I maybe missed something that is why I need your help). All seems to be set as it said. I'm not using Proguard so I haven't do the googleplayservice proguard steps.

Here's the manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0" package="com.bas.revmobtesting" android:installLocation="preferExternal">
  <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true" />
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
    <activity android:label="@string/app_name" android:name="com.bas.revmobtesting.UnityPlayerNativeActivity" android:screenOrientation="portrait" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    </activity>
    <activity android:configChanges="keyboardHidden|orientation" android:name="com.revmob.ads.fullscreen.FullscreenActivity" android:theme="@android:style/Theme.Translucent">
    </activity>
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
  </application>
  <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="20" />
  <uses-feature android:glEsVersion="0x00020000" />
  <uses-permission android:name="android.permission.INTERNET" />
</manifest>

here's the simple script:

public class RevMobTesting : MonoBehaviour, IRevMobListener
{
        private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String> () {
        { "Android", "My_ANDROID_ID"},
        { "IOS", "My_IOS_ID" }
    };
        private RevMob revmob;

        void Awake ()
        {
                revmob = RevMob.Start (REVMOB_APP_IDS, gameObject.name);
                revmob.SetTestingMode (RevMob.Test.WITH_ADS);
                revmob.PrintEnvironmentInformation ();
        }

        private void Start ()
        {
                #if UNITY_ANDROID || UNITY_IPHONE
                RevMobBanner banner = revmob.CreateBanner ();
                banner.Show ();
                #endif
        }

    #region IRevMobListener implementation
        public void SessionIsStarted ()
        {
                Debug.Log ("Session started.");
        }

        public void SessionNotStarted (string revMobAdType)
        {
                Debug.Log ("Session not started.");
        }

        public void AdDidReceive (string revMobAdType)
        {
                Debug.Log ("Ad did receive.");
        }

        public void AdDidFail (string revMobAdType)
        {
                Debug.Log ("Ad did fail.");
        }

        public void AdDisplayed (string revMobAdType)
        {
                Debug.Log ("Ad displayed.");
        }

        public void UserClickedInTheAd (string revMobAdType)
        {
                Debug.Log ("Ad clicked.");
        }

        public void UserClosedTheAd (string revMobAdType)
        {
                Debug.Log ("Ad closed.");
        }

        public void InstallDidReceive (string message)
        {
                Debug.Log ("Install received");
        }

        public void InstallDidFail (string message)
        {
                Debug.Log ("Install not received");
        }

        public void EulaIsShown ()
        {
                Debug.Log ("Eula is displayed");
        }

        public void EulaAccepted ()
        {
                Debug.Log ("Eula was accepted");
        }

        public void EulaRejected ()
        {
                Debug.Log ("Eula was rejected");
        }
    #endregion
}

Thanks in advance, David


Solution

  • Don't know you solved the issue or not. I got the same problem when upgraded to 7.3.2. I used to use this line to create banner:

    banner = revmob.CreateBanner(RevMob.Position.BOTTOM);
    

    In 7.3.2, "AdDisplayed" event triggered, but no banner showing. Finally, I succeeded to summon the banner with codes like:

    int bannerWidth = (int) Screen.width;
    cost float bannerRatio = 6.4f;
    int bannerHeight = (int) (Screen.width / bannerRatio);
    banner = revmob.CreateBanner(RevMob.Position.TOP,
                                 0, (int)(Screen.height - bannerHeight),
                                 bannerWidth, bannerHeight);
    

    It seems Position.BOTTOM doesn't work in 7.3.2. I'm also waiting for RevMob's reply.