我有一个问题与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) {
}
};
根据Vungle的说法,onVideoView
方法已被弃用,而应该使用onAdEnd
方法。你应该尝试像下面这样移动显示到onAdEnd
的片段:
@Override
public void onAdEnd(boolean wasCallToActionClicked) {
frag.show(fm, "");
}