use of org.prebid.mobile.rendering.errors.AdException in project prebid-mobile-android by prebid.
the class PrebidInterstitialAdapter method initInterstitialController.
private void initInterstitialController(Context context, String responseId) {
try {
mInterstitialController = new InterstitialController(context, mInterstitialListener);
mInterstitialController.loadAd(responseId, false);
} catch (AdException e) {
MoPubLog.log(MoPubLog.AdapterLogEvent.LOAD_FAILED, TAG);
mLoadListener.onAdLoadFailed(MoPubErrorCode.ADAPTER_CONFIGURATION_ERROR);
}
}
use of org.prebid.mobile.rendering.errors.AdException in project prebid-mobile-android by prebid.
the class InterstitialView method init.
@Override
protected void init() throws AdException {
try {
super.init();
setAdViewManagerValues();
registerEventBroadcast();
} catch (Exception e) {
throw new AdException(AdException.INIT_ERROR, "AdView initialization failed: " + Log.getStackTraceString(e));
}
}
use of org.prebid.mobile.rendering.errors.AdException in project prebid-mobile-android by prebid.
the class InterstitialView method showVideoAsInterstitial.
public void showVideoAsInterstitial() {
try {
final AdConfiguration adConfiguration = mAdViewManager.getAdConfiguration();
mInterstitialManager.configureInterstitialProperties(adConfiguration);
mInterstitialVideo = new InterstitialVideo(getContext(), InterstitialView.this, mInterstitialManager, adConfiguration);
mInterstitialVideo.setDialogListener(this::handleDialogEvent);
mInterstitialVideo.show();
} catch (final Exception e) {
LogUtil.error(TAG, "Video interstitial failed to show:" + Log.getStackTraceString(e));
notifyErrorListeners(new AdException(AdException.INTERNAL_ERROR, e.getMessage()));
}
}
use of org.prebid.mobile.rendering.errors.AdException in project prebid-mobile-android by prebid.
the class PrebidBannerAdapter method initDisplayView.
private void initDisplayView(Context context, String responseId) {
try {
AdConfiguration adUnitConfiguration = new AdConfiguration();
adUnitConfiguration.setAdUnitIdentifierType(AdConfiguration.AdUnitIdentifierType.BANNER);
mDisplayView = new DisplayView(context, mDisplayViewListener, adUnitConfiguration, responseId);
} catch (AdException e) {
MoPubLog.log(MoPubLog.AdapterLogEvent.LOAD_FAILED, TAG);
mLoadListener.onAdLoadFailed(MoPubErrorCode.ADAPTER_CONFIGURATION_ERROR);
}
}
use of org.prebid.mobile.rendering.errors.AdException in project prebid-mobile-android by prebid.
the class PrebidRewardedVideoAdapter method initInterstitialController.
private void initInterstitialController(Context context, String responseId) {
try {
mInterstitialController = new InterstitialController(context, mInterstitialListener);
mInterstitialController.loadAd(responseId, true);
} catch (AdException e) {
MoPubLog.log(MoPubLog.AdapterLogEvent.LOAD_FAILED, TAG);
mLoadListener.onAdLoadFailed(MoPubErrorCode.ADAPTER_CONFIGURATION_ERROR);
}
}
Aggregations