When trying to play Vungle ads, I'm always getting the message Ad unavailable: No cached or streaming ad available
from the method onAdUnavailable()
What's puzzling me is that it used to work and now it doesn't. It still works on devices where the old version of my app is installed, but when I build it now, it just says ads are unavailable.
I'm implementing Vungle as per their very basic instructions:
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
is correct (when I use an incorrect id, I get a specific error), and internet connection is available on the device (AdMob interstitial ads work properly as well as internet in general).
I don't know what to try any more, I'm out of ideas.