本文整理匯總了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));
}
}