我遇到了vungle的问题,我想在视频广告结束后出现对话框片段,我的代码看起来很好并且没有错误,视频开始和结束但是我的对话框片段永远不会出现,这是我的代码:
private final EventListener vungleListener = new EventListener(){
@Override
public void onVideoView(boolean isCompletedView, int watchedMillis, int videoDurationMillis) {
if (isCompletedView){
frag.show(fm, "");
}
}
@Override
public void onAdStart() {
// Called before playing an ad
}
@Override
public void onAdEnd(boolean wasCallToActionClicked) {
}
@Override
public void onAdPlayableChanged(boolean isAdPlayable) {
}
@Override
public void onAdUnavailable(String reason) {
}
};
答案 0 :(得分:0)
根据Vungle,不推荐使用方法onVideoView
,而应使用方法onAdEnd
。您应该尝试将显示的片段移动到onAdEnd
,如下所示:
@Override
public void onAdEnd(boolean wasCallToActionClicked) {
frag.show(fm, "");
}