com.inmobi.ads.InMobiInterstitial Java Examples

The following examples show how to use com.inmobi.ads.InMobiInterstitial. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onAdRewardActionCompleted(InMobiInterstitial ad, Map<Object, Object> rewards) {
  Log.d(TAG, "InMobi Rewarded video onRewardActionCompleted.");
  if (null != rewards) {
    Iterator<Object> iterator = rewards.keySet()
        .iterator();
    String key = "", value = "";
    while (iterator.hasNext()) {
      key = iterator.next()
          .toString();
      value = rewards.get(key)
          .toString();
      Log.d("Rewards: ", key + ":" + value);
    }
    MoPubRewardedVideoManager.onRewardedVideoCompleted(InMobiRewardedCustomEvent.class, null,
        MoPubReward.success(key, Integer.parseInt(value)));
  }
}
 
Example #2
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 5 votes vote down vote up
@Override public void onAdLoadSucceeded(InMobiInterstitial ad) {
  Log.v(TAG, "Ad load succeeded");
  if (ad != null) {
    MoPubRewardedVideoManager.onRewardedVideoLoadSuccess(InMobiRewardedCustomEvent.class,
        placementId);
  }
}
 
Example #3
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onAdLoadFailed(InMobiInterstitial inMobiInterstitial, InMobiAdRequestStatus inMobiAdRequestStatus) {
    Clog.e(Clog.mediationLogTag, "InMobiInterstitial: onAdLoadFailed" );
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdFailed(InMobiSettings.getResultCode(inMobiAdRequestStatus));
    }
}
 
Example #4
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onAdLoadSucceeded(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdLoadSucceeded" );
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdLoaded();
    }
}
 
Example #5
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onAdClicked(InMobiInterstitial inMobiInterstitial, Map<Object, Object> map) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdClicked" );
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdClicked();
    }

}
 
Example #6
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 5 votes vote down vote up
@Override public void onAdLoadFailed(InMobiInterstitial ad, InMobiAdRequestStatus status) {

    Log.v(TAG, "Ad failed to load:" + status.getStatusCode()
        .toString());
    if (status.getStatusCode() == StatusCode.INTERNAL_ERROR) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.INTERNAL_ERROR);
    } else if (status.getStatusCode() == StatusCode.REQUEST_INVALID) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.ADAPTER_CONFIGURATION_ERROR);
    } else if (status.getStatusCode() == StatusCode.NETWORK_UNREACHABLE) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.NETWORK_INVALID_STATE);
    } else if (status.getStatusCode() == StatusCode.NO_FILL) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.NO_FILL);
    } else if (status.getStatusCode() == StatusCode.REQUEST_TIMED_OUT) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.NETWORK_TIMEOUT);
    } else if (status.getStatusCode() == StatusCode.SERVER_ERROR) {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.SERVER_ERROR);
    } else {
      MoPubRewardedVideoManager.onRewardedVideoLoadFailure(InMobiRewardedCustomEvent.class,
          getAdNetworkId(), MoPubErrorCode.UNSPECIFIED);
    }
  }
 
Example #7
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onAdDisplayed(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdDisplayed" );
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdExpanded();
    }
}
 
Example #8
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onAdDismissed(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdDismissed" );
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdCollapsed();
    }

}
 
Example #9
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onRewardsUnlocked(InMobiInterstitial inMobiInterstitial, Map<Object, Object> map) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onRewardsUnlocked" );

}
 
Example #10
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onAdWillDisplay(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdWillDisplay" );

}
 
Example #11
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onAdDisplayFailed(InMobiInterstitial inMobiInterstitial) {
    Clog.e(Clog.mediationLogTag, "InMobiInterstitial: onAdDisplayFailed" );

}
 
Example #12
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onAdReceived(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onAdReceived" );

}
 
Example #13
Source File: InMobiInterstitialAdListener.java    From mobile-sdk-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onUserLeftApplication(InMobiInterstitial inMobiInterstitial) {
    Clog.d(Clog.mediationLogTag, "InMobiInterstitial: onUserLeftApplication" );

}
 
Example #14
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onUserLeftApplication(InMobiInterstitial ad) {
  Log.v(TAG, "User left application");
}
 
Example #15
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdDismissed(InMobiInterstitial ad) {
  Log.v(TAG, "Ad dismissed");
  MoPubRewardedVideoManager.onRewardedVideoClosed(InMobiRewardedCustomEvent.class, placementId);
}
 
Example #16
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdInteraction(InMobiInterstitial ad, Map<Object, Object> params) {
  Log.v(TAG, "Ad interaction");
  MoPubRewardedVideoManager.onRewardedVideoClicked(InMobiRewardedCustomEvent.class, placementId);
}
 
Example #17
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdDisplayed(InMobiInterstitial ad) {
  Log.v(TAG, "Ad displayed");
  MoPubRewardedVideoManager.onRewardedVideoStarted(InMobiRewardedCustomEvent.class, placementId);
}
 
Example #18
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdWillDisplay(InMobiInterstitial ad) {
  Log.d(TAG, "Rewarded video ad will display.");
}
 
Example #19
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdDisplayFailed(InMobiInterstitial ad) {
  Log.d(TAG, "Rewarded video ad failed to display.");
}
 
Example #20
Source File: InMobiRewardedCustomEvent.java    From aptoide-client-v8 with GNU General Public License v3.0 4 votes vote down vote up
@Override public void onAdReceived(InMobiInterstitial ad) {
  Log.d(TAG, "InMobi Adserver responded with an Ad");
}