本文整理汇总了Java中com.flurry.android.ads.FlurryAdErrorType类的典型用法代码示例。如果您正苦于以下问题:Java FlurryAdErrorType类的具体用法?Java FlurryAdErrorType怎么用?Java FlurryAdErrorType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FlurryAdErrorType类属于com.flurry.android.ads包,在下文中一共展示了FlurryAdErrorType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(final FlurryAdNative nativeAd, final FlurryAdErrorType adErrorType, final int errorCode) {
switch (adErrorType) {
case FETCH:
this.getCustomEventNativeListener().onNativeAdFailed(NativeErrorCode.NETWORK_NO_FILL);
break;
case CLICK:
this.getCustomEventNativeListener().onNativeAdFailed(NativeErrorCode.NATIVE_ADAPTER_CONFIGURATION_ERROR);
break;
case RENDER:
this.getCustomEventNativeListener().onNativeAdFailed(NativeErrorCode.NATIVE_RENDERER_CONFIGURATION_ERROR);
break;
default:
this.getCustomEventNativeListener().onNativeAdFailed(NativeErrorCode.UNSPECIFIED);
break;
}
}
开发者ID:ayltai,项目名称:mopub-nativead-adapters,代码行数:21,代码来源:FlurryNativeAd.java
示例2: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int errCode) {
endFlurrySession(mContext);
if (FlurryAdErrorType.FETCH == flurryAdErrorType) {
invokeLoadFinish(null);
} else {
invokeLoadFail(new Exception(flurryAdErrorType.name() + " - " + errCode));
}
}
开发者ID:pubnative,项目名称:pubnative-android-sdk,代码行数:10,代码来源:YahooNetworkAdapter.java
示例3: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType,
int errorCode) {
if (flurryAdErrorType == FlurryAdErrorType.FETCH) {
mFetchFailCount++;
flurryAdNative.destroy();
}
// Retry after some delay
RETRY_FETCH_HANDLER.postDelayed(RETRY_FETCH_RUNNABLE, RETRY_TIME_MILLI);
for (FlurryAdNativeListener listener : mExternalListeners) {
listener.onError(flurryAdNative, flurryAdErrorType, errorCode);
}
Log.w(TAG, "onError. Error code: " + errorCode);
}
开发者ID:flurry,项目名称:StreamAds-Android,代码行数:16,代码来源:FlurryNativeAdFetcher.java
示例4: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int i) {
if (adRequestCompleted) {
// if ad request is complete already, return immediately
return;
}
adRequestCompleted = true;
ANLog.e("FlurryAdNetwork#onError: " + flurryAdErrorType.name());
ANLog.e("Error:"+flurryAdErrorType.toString()+" CODE:"+i);
mCustomEventListener.onNativeAdFailed(ErrorCode.NETWORK_NO_FILL);
}
开发者ID:picatcha,项目名称:adsnative-sdk-android,代码行数:12,代码来源:FlurryAdNetwork.java
示例5: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdBanner flurryAdBanner, FlurryAdErrorType flurryAdErrorType, int i) {
MediatedBannerAdViewController controller = this.controller.get();
if (controller != null) {
controller.onAdFailed(YahooFlurrySettings.errorCodeMapping(flurryAdErrorType, i));
}
}
开发者ID:appnexus,项目名称:mobile-sdk-android,代码行数:8,代码来源:YahooFlurryBanner.java
示例6: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdInterstitial flurryAdInterstitial, FlurryAdErrorType flurryAdErrorType, int i) {
MediatedInterstitialAdViewController controller = this.controller.get();
if (controller != null) {
controller.onAdFailed(YahooFlurrySettings.errorCodeMapping(flurryAdErrorType, i));
}
}
开发者ID:appnexus,项目名称:mobile-sdk-android,代码行数:8,代码来源:YahooFlurryInterstitial.java
示例7: errorCodeMapping
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
public static ResultCode errorCodeMapping(FlurryAdErrorType flurryAdErrorType, int i) {
// See details here: https://gist.github.com/flurrydev/92d14e136403c2ea35b4
ResultCode error = ResultCode.INTERNAL_ERROR;
if (i == 1) {
error = ResultCode.NETWORK_ERROR;
} else if (i == 4 || i == 21) {
error = ResultCode.INVALID_REQUEST;
} else if (i == 20) {
error = ResultCode.UNABLE_TO_FILL;
}
return error;
}
开发者ID:appnexus,项目名称:mobile-sdk-android,代码行数:13,代码来源:YahooFlurrySettings.java
示例8: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int i) {
MediatedNativeAdController controller = this.controller.get();
if (controller != null) {
controller.onAdFailed(YahooFlurrySettings.errorCodeMapping(flurryAdErrorType, i));
}
}
开发者ID:appnexus,项目名称:mobile-sdk-android,代码行数:8,代码来源:YahooFlurryNativeAd.java
示例9: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int errCode) {
FlurryAgent.onEndSession(mContext);
invokeLoadFail(new Exception("Flurry error: " + flurryAdErrorType.name() + " - " + errCode));
}
开发者ID:pubnative,项目名称:pubnative-android-sdk,代码行数:6,代码来源:YahooNetworkAdapter.java
示例10: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdInterstitial flurryAdInterstitial, FlurryAdErrorType flurryAdErrorType, int errCode) {
FlurryAgent.onEndSession(mContext);
invokeLoadFail(new Exception("Flurry error: " + flurryAdErrorType.name() + " - " + errCode));
}
开发者ID:pubnative,项目名称:pubnative-android-sdk,代码行数:6,代码来源:YahooNetworkInterstitialAdapter.java
示例11: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int i) {}
开发者ID:pubnative,项目名称:pubnative-android-sdk,代码行数:3,代码来源:YahooNativeAdModel.java
示例12: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType,
int errorCode) { }
开发者ID:flurry,项目名称:StreamAds-Android,代码行数:4,代码来源:StubFlurryAdNativeListener.java
示例13: onActivityCreated
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Integer data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
BaseAdapter dataAdapter = new ArrayAdapter<>(getActivity(), R.layout.list_item_sample,
R.id.sample_data_text, data);
NativeAdViewBinder.ViewBinderBuilder viewBinderBuilder = new NativeAdViewBinder.ViewBinderBuilder();
NativeAdViewBinder viewBinder = viewBinderBuilder.setAdLayoutId(R.layout.list_item_ad)
.setHeadlineTextId(R.id.ad_headline)
.setDescriptionTextId(R.id.ad_description)
.setSourceTextId(R.id.ad_source)
.setBrandingLogoImageId(R.id.sponsored_image)
.setAppStarRatingImageId(R.id.app_rating_image)
.setAdImageId(R.id.ad_image)
.setCallToActionViewId(R.id.ad_cta_btn)
.setAdCollapseViewId(R.id.ad_collapse_btn)
.build();
FlurryAdNativeListener adStateListener = new StubFlurryAdNativeListener() {
@Override
public void onError(FlurryAdNative flurryAdNative,
FlurryAdErrorType flurryAdErrorType, int errorCode) {
Log.e(TAG, "Ad could not load. Error code: " + errorCode);
}
};
FlurryAdListAdapter adListAdapter = FlurryAdListAdapter
.from(getActivity(), dataAdapter, viewBinder, AD_SPACE)
.setAdPositioner(new LinearIntervalAdPositioner(3, 4))
.setFlurryAdNativeListener(adStateListener)
.setAutoDestroy(false)
.setExpandableAdMode(NativeAdAdapter.EXPANDABLE_AD_MODE_COLLAPSED)
.build();
adListAdapter.addAdRenderListener(this);
adListAdapter.setRetryFailedAdPositions(false);
setListAdapter(adListAdapter);
((FlurryAdListAdapter)getListAdapter()).refreshAds();
}
开发者ID:flurry,项目名称:StreamAds-Android,代码行数:44,代码来源:SampleListFragment.java
示例14: onActivityCreated
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
int data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
SimpleArrayAdapter adapter = new SimpleArrayAdapter(data);
NativeAdViewBinder.ViewBinderBuilder viewBinderBuilder = new NativeAdViewBinder.ViewBinderBuilder();
NativeAdViewBinder viewBinder = viewBinderBuilder.setAdLayoutId(R.layout.list_item_ad)
.setHeadlineTextId(R.id.ad_headline)
.setDescriptionTextId(R.id.ad_description)
.setSourceTextId(R.id.ad_source)
.setBrandingLogoImageId(R.id.sponsored_image)
.setAppStarRatingImageId(R.id.app_rating_image)
.setAdImageId(R.id.ad_image)
.build();
FlurryAdTargeting flurryAdTargeting = new FlurryAdTargeting();
flurryAdTargeting.setEnableTestAds(true);
FlurryAdNativeListener adStateListener = new StubFlurryAdNativeListener() {
@Override
public void onError(FlurryAdNative flurryAdNative,
FlurryAdErrorType flurryAdErrorType, int errorCode) {
Log.e(TAG, "Ad could not load. Error code: " + errorCode);
}
};
FlurryAdRecyclerAdapter adsAdapter = FlurryAdRecyclerAdapter.from(getActivity(), adapter,
viewBinder, AD_SPACE)
.setAdPositioner(new LinearIntervalAdPositioner(3, 4))
.setTargeting(flurryAdTargeting)
.setFlurryAdNativeListener(adStateListener)
.setAutoDestroy(false)
.build();
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity(),
LinearLayoutManager.VERTICAL, false));
mRecyclerView.setAdapter(adsAdapter);
}
开发者ID:flurry,项目名称:StreamAds-Android,代码行数:42,代码来源:SampleRecyclerFragment.java
示例15: onError
import com.flurry.android.ads.FlurryAdErrorType; //导入依赖的package包/类
@Override
public void onError(FlurryAdNative flurryAdNative, FlurryAdErrorType flurryAdErrorType, int i) {
ANLog.e("FlurryAdNetwork#onError: " + flurryAdErrorType.name());
ANLog.e("Error:"+flurryAdErrorType.toString()+" CODE:"+i);
mCustomEventListener.onNativeAdFailed(ErrorCode.NETWORK_NO_FILL);
}
开发者ID:picatcha,项目名称:adsnative-sdk-android,代码行数:7,代码来源:FlurryAdNetwork.java
注:本文中的com.flurry.android.ads.FlurryAdErrorType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论