我剛剛更新revmob與Unity的最後sdk(7.3.2)。我正在使用Unity 4.5 Pro。除了不顯示廣告之外,一切似乎都很好。調試說,橫幅廣告顯示......但屏幕上沒有任何東西可以點擊......另外,我也沒有在遊戲發佈時獲得任何Eula Popup。RevMob沒有廣告顯示
我認爲我沒有錯過任何文件(我可能錯過了這是爲什麼我需要你的幫助)。似乎都像它說的那樣設置。我沒有使用Proguard,所以我沒有執行googleplayservice proguard步驟。
這裏的清單:
<?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>
這裏的簡單腳本:提前
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
}
謝謝, 大衛
好吧,經過幾次測試,似乎全屏廣告正在工作,但如果我使用橫幅,它不會顯示出來......而我從來沒有得到EULA彈出窗口... –
最後,唯一的問題是橫幅。聯繫revmob後,EULA彈出窗口將不顯示,直到他們決定。等待關於橫幅問題的新聞:) –