0

I'm having a problem with vungle, I want the dialog fragment to appear after the video ad ends, my code looks good and there is no errors, the video starts and ends but my dialog fragment never appears, here is my code:

 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) {

                }

              };
Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
Nassef
  • 35
  • 6

1 Answers1

0

According to Vungle the method onVideoView is deprecated and the method onAdEnd should be used instead. You should try moving the fragment being shown to onAdEnd like below:

@Override
public void onAdEnd(boolean wasCallToActionClicked) {
    frag.show(fm, "");
}
KevinZ
  • 756
  • 1
  • 12
  • 26