3

I am trying to integrate Vungle ads in my Android Project. Everything in my code is similar to what was mentioned in Vungle SDK - Developer Guide and Advanced Settings.

But when I call vunglePub.playAd();, onAdUnavailable(String reason) gets called with result "No cached or streaming ad available". This happens every time I want to play add, whether or not I am connected to the Internet. Internet works everywhere, in Browser, Play Store, every other ad, even Vungle Ads on other apps can played.

My Listener looks like this:

private final EventListener vungleListener = new EventListener() {

    @Override
    public void onVideoView(boolean isCompletedView, int watchedMillis, int videoDurationMillis) {
        Log.d(MY_LOGS, "onVideoView");
    }

    @Override
    public void onAdStart() {
        Log.d(MY_LOGS, "onAdStart");
        // Called before playing an ad
    }

    @Override
    public void onAdEnd(boolean wasCallToActionClicked) {
        Log.d(MY_LOGS, "wasCallToActionClicked");
        // Called when the user leaves the ad and control is returned to your application
    }

    @Override
    public void onCachedAdAvailable() {
        Log.d(MY_LOGS, "onCachedAdAvailable");
        // Called when an ad is downloaded and may be played
    }

    @Override
    public void onAdUnavailable(String reason) {
        Log.d(MY_LOGS, "onAdUnavailable, reason: " + reason);
        // Called when VunglePub.playAd() was called, but no ad was available to play
    }

};

P.S. On my question looks exactly same as this one, Vungle ads not available:

  • I have added every thing required in my Manifest file.
  • I have checked and rechecked my AppID.
  • Moreover, TimSim's problem was solved by upgrading to a later version of Vungle SDK, I am already on the latest version.
4

0 回答 0