尝试播放 Vungle 广告时,我总是Ad unavailable: No cached or streaming ad available
从方法中收到消息onAdUnavailable()
令我困惑的是,它曾经可以工作,而现在却不行。它仍然可以在安装了我的旧版本应用程序的设备上运行,但是当我现在构建它时,它只是说广告不可用。
我正在按照他们非常基本的说明实施 Vungle:
final VunglePub vunglePub = VunglePub.getInstance();
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
vunglePub.init(this, APP_ID);
vunglePub.setEventListener(vungleListener);
}
private final EventListener vungleListener = new EventListener() {
@Override
public void onVideoView(boolean isCompletedView, int watchedMillis, int videoDurationMillis) {
// Called each time a video completes. isCompletedView is true if the video was not skipped.
}
@Override
public void onAdStart() {
// Called before playing an ad
}
@Override
public void onAdEnd() {
// Called when the user leaves the ad and control is returned to your application
}
@Override
public void onCachedAdAvailable() {
// I don't get this any more
Log.i("vungle","cachedAdAvail");
}
@Override
public void onAdUnavailable(String arg0) {
//I get this when I try to play the ad
Log.i("vungle","Ad unavailable: "+arg0);
}
};
public void playVungleAd() {
vunglePub.playAd();
}
APP_ID
是正确的(当我使用不正确的 ID 时,我会收到一个特定的错误),并且设备上的互联网连接可用(AdMob 插页式广告和一般互联网一样正常工作)。
我不知道该尝试什么了,我没有想法。