當前位置: 首頁>>代碼示例>>Java>>正文


Java InMobiAdRequestStatus類代碼示例

本文整理匯總了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;
    }
}
 
開發者ID:googleads,項目名稱:googleads-mobile-android-mediation,代碼行數:30,代碼來源:InMobiAdapter.java

示例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));
    }
}
 
開發者ID:appnexus,項目名稱:mobile-sdk-android,代碼行數:8,代碼來源:InMobiNativeAdListener.java

示例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;
}
 
開發者ID:appnexus,項目名稱:mobile-sdk-android,代碼行數:32,代碼來源:InMobiSettings.java

示例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);
}
 
開發者ID:picatcha,項目名稱:adsnative-sdk-android,代碼行數:6,代碼來源:InMobiAdNetwork.java

示例5: onAdLoadFailed

import com.inmobi.ads.InMobiAdRequestStatus; //導入依賴的package包/類
@Override
public void onAdLoadFailed(InMobiBanner inMobiBanner, InMobiAdRequestStatus inMobiAdRequestStatus) {
    if (mediatedAdViewController != null) {
        mediatedAdViewController.onAdFailed(InMobiSettings.getResultCode(inMobiAdRequestStatus));
    }
}
 
開發者ID:appnexus,項目名稱:mobile-sdk-android,代碼行數:7,代碼來源:InMobiListener.java


注:本文中的com.inmobi.ads.InMobiAdRequestStatus類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。