use of com.mopub.mobileads.AdLifecycleListener.InteractionListener in project mytarget-android by myTargetSDK.
the class MyTargetMopubCustomEventBanner method onClick.
@Override
public void onClick(@NonNull MyTargetView myTargetView) {
InteractionListener interactionListener = mInteractionListener;
if (interactionListener != null) {
interactionListener.onAdClicked();
}
MoPubLog.log(getAdNetworkId(), CLICKED, ADAPTER_NAME);
}
use of com.mopub.mobileads.AdLifecycleListener.InteractionListener in project mytarget-android by myTargetSDK.
the class MyTargetMopubCustomEventBanner method onNoAd.
@Override
public void onNoAd(@NonNull String reason, @NonNull MyTargetView myTargetView) {
MoPubLog.log(getAdNetworkId(), CUSTOM, ADAPTER_NAME, "myTarget banner ad failed to load.");
MoPubErrorCode code = NETWORK_NO_FILL;
MoPubLog.log(getAdNetworkId(), LOAD_FAILED, ADAPTER_NAME, code.getIntCode(), code);
InteractionListener interactionListener = mInteractionListener;
LoadListener loadListener = mLoadListener;
if (interactionListener == null && loadListener != null) {
loadListener.onAdLoadFailed(code);
} else if (interactionListener != null) {
interactionListener.onAdFailed(code);
}
}
use of com.mopub.mobileads.AdLifecycleListener.InteractionListener in project mytarget-android by myTargetSDK.
the class MyTargetMopubCustomEventInterstitial method onClick.
@Override
public void onClick(@NonNull InterstitialAd ad) {
MoPubLog.log(getAdNetworkId(), CLICKED, ADAPTER_NAME);
InteractionListener interactionListener = mInteractionListener;
if (interactionListener != null) {
interactionListener.onAdClicked();
}
}
use of com.mopub.mobileads.AdLifecycleListener.InteractionListener in project mytarget-android by myTargetSDK.
the class MyTargetMopubCustomEventRewardedVideo method onDisplay.
@Override
public void onDisplay(@NonNull RewardedAd ad) {
MoPubLog.log(getAdNetworkId(), SHOW_SUCCESS, ADAPTER_NAME);
InteractionListener interactionListener = mInteractionListener;
if (interactionListener != null) {
interactionListener.onAdShown();
interactionListener.onAdImpression();
}
}
use of com.mopub.mobileads.AdLifecycleListener.InteractionListener in project mytarget-android by myTargetSDK.
the class MyTargetMopubCustomEventRewardedVideo method onReward.
@Override
public void onReward(@NonNull Reward reward, @NonNull RewardedAd ad) {
MoPubLog.log(AdLogEvent.CUSTOM, ADAPTER_NAME, "Rewarded");
InteractionListener interactionListener = mInteractionListener;
if (interactionListener != null) {
interactionListener.onAdComplete(MoPubReward.success(reward.type, MoPubReward.NO_REWARD_AMOUNT));
}
}
Aggregations