本文整理汇总了Java中com.inmobi.ads.InMobiAdRequestStatus类的典型用法代码示例。如果您正苦于以下问题:Java InMobiAdRequestStatus类的具体用法?Java InMobiAdRequestStatus怎么用?Java InMobiAdRequestStatus使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InMobiAdRequestStatus类属于com.inmobi.ads包,在下文中一共展示了InMobiAdRequestStatus类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdRequestErrorCode
import com.inmobi.ads.InMobiAdRequestStatus; //导入依赖的package包/类
/**
* Converts a {@link com.inmobi.ads.InMobiAdRequestStatus.StatusCode} to Google Mobile
* Ads SDK readable error code.
*
* @param statusCode the {@link com.inmobi.ads.InMobiAdRequestStatus.StatusCode} to be
* converted.
* @return an {@link AdRequest} error code.
*/
private static int getAdRequestErrorCode(InMobiAdRequestStatus.StatusCode statusCode) {
switch (statusCode) {
case INTERNAL_ERROR:
return AdRequest.ERROR_CODE_INTERNAL_ERROR;
case AD_ACTIVE:
case REQUEST_INVALID:
case REQUEST_PENDING:
case EARLY_REFRESH_REQUEST:
case MISSING_REQUIRED_DEPENDENCIES:
return AdRequest.ERROR_CODE_INVALID_REQUEST;
case REQUEST_TIMED_OUT:
case NETWORK_UNREACHABLE:
return AdRequest.ERROR_CODE_NETWORK_ERROR;
case NO_FILL:
case SERVER_ERROR:
case AD_NO_LONGER_AVAILABLE:
case NO_ERROR:
default:
return AdRequest.ERROR_CODE_NO_FILL;
}
}
示例2: onAdLoadFailed
import com.inmobi.ads.InMobiAdRequestStatus; //导入依赖的package包/类
@Override
public void onAdLoadFailed(InMobiNative inMobiNative, InMobiAdRequestStatus inMobiAdRequestStatus) {
Clog.d(Clog.mediationLogTag, "InMobi: " + inMobiAdRequestStatus.toString());
if (controller != null) {
controller.onAdFailed(InMobiSettings.getResultCode(inMobiAdRequestStatus));
}
}
示例3: getResultCode
import com.inmobi.ads.InMobiAdRequestStatus; //导入依赖的package包/类
public static ResultCode getResultCode(InMobiAdRequestStatus status) {
ResultCode code = ResultCode.INTERNAL_ERROR;
switch (status.getStatusCode()) {
case NETWORK_UNREACHABLE:
code = ResultCode.NETWORK_ERROR;
break;
case NO_FILL:
code = ResultCode.UNABLE_TO_FILL;
break;
case REQUEST_INVALID:
code = ResultCode.INVALID_REQUEST;
break;
case REQUEST_PENDING:
break;
case REQUEST_TIMED_OUT:
code = ResultCode.NETWORK_ERROR;
break;
case INTERNAL_ERROR:
break;
case SERVER_ERROR:
code = ResultCode.UNABLE_TO_FILL;
break;
case AD_ACTIVE:
code = ResultCode.INVALID_REQUEST;
break;
case EARLY_REFRESH_REQUEST:
code = ResultCode.INVALID_REQUEST;
break;
}
return code;
}
示例4: onAdLoadFailed
import com.inmobi.ads.InMobiAdRequestStatus; //导入依赖的package包/类
@Override
public void onAdLoadFailed(InMobiNative inMobiNative, InMobiAdRequestStatus inMobiAdRequestStatus) {
ANLog.e("InMobiAdNetwork: Failed to load - " + inMobiAdRequestStatus.getMessage());
mCustomEventNativeListener.onNativeAdFailed(ErrorCode.NETWORK_NO_FILL);
}
示例5: onAdLoadFailed
import com.inmobi.ads.InMobiAdRequestStatus; //导入依赖的package包/类
@Override
public void onAdLoadFailed(InMobiBanner inMobiBanner, InMobiAdRequestStatus inMobiAdRequestStatus) {
if (mediatedAdViewController != null) {
mediatedAdViewController.onAdFailed(InMobiSettings.getResultCode(inMobiAdRequestStatus));
}
}