当前位置: 首页>>代码示例>>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;未经允许,请勿转载。