Vungle ads not available
When trying to play Vungle ads, I always get a message Ad unavailable: No cached or streaming ad available
from the methodonAdUnavailable()
What puzzles me is that it worked 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 that ads are not available.
I am implementing Vungle according to their 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
correct (when I use the wrong id, I get a specific error) and an internet connection is available on the device (AdMob interstitials are working fine, and so is the internet in general).
I don't know what to try more, I have no ideas.
source to share
It looks like you are in one of the newer versions of our SDK (3.x). There are several things you can check:
-
Make sure you include our service in your manifest, https://github.com/Vungle/vungle-resources/blob/master/Android-resources/android-dev-guide.md#3-update-androidmanifestxml
-
If you've recently updated to version 3.1.0 (or higher), additional steps are needed, https://github.com/Vungle/vungle-resources/blob/master/Android-resources/android-dev-guide.md#additional- steps-for-sdk-version-310-or-higher
-
I know you are saying that you have the correct AppID, but to be sure, use the red in the upper left corner of your app page on a dash (not the reporting API id)
-
If you still have problems, feel free to email us at tech-support@vungle.com !
source to share