所以当我试图在我的设备上显示间质广告时,我遇到了一个问题。
请求间隙广告总是返回一个成功的消息,但当我试图调用显示功能时,什么也不会发生。
它只发生在间隙广告,因为横幅广告是工作和显示在设备上。
此外,AdColony仪表板接收新请求,但仍然显示函数不起作用:

我试过使用现场广告和测试广告。
我在用:
团结2020.1.4f1
外部依赖管理器1.2.156
AdColony 4.3.1
--这是我试图运行的代码的一部分:
AdColony.InterstitialAd _ad = null;
// Start is called before the first frame update
void Start()
{
string[] zoneIds = new string[] { "myZoneID" };
AdColony.Ads.Configure("myAppID", null, zoneIds);
AdColony.Ads.OnRequestInterstitial += (AdColony.InterstitialAd ad) => {
_ad = ad;
};
AdColony.Ads.OnExpiring += (AdColony.InterstitialAd ad) => {
AdColony.Ads.RequestInterstitialAd("myZoneID", null);
};
}
public void Request()
{
AdColony.Ads.RequestInterstitialAd("myZoneID", null);
}
public void Show()
{
if (_ad != null) {
AdColony.Ads.ShowAd(_ad);
}
else
{
Debug.Log("null");
}
}有办法解决这个问题吗?
发布于 2020-09-11 09:14:45
我终于让它起作用了!
为了展示广告,我需要解决三个问题。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.adcolony.unitypluginpackage">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<!-- OPTIONAL -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- OPTIONAL -->
<uses-permission android:name="android.permission.VIBRATE" />
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<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" />
</activity>
<activity android:name="com.adcolony.sdk.AdColonyInterstitialActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:hardwareAccelerated="true"/>
<activity android:name="com.adcolony.sdk.AdColonyAdViewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true"/>
</application>
</manifest>

现在间质广告运作得很好!
https://stackoverflow.com/questions/63806931
复制相似问题