Cloud(Native):
private void loadcloudAdNative(String nativeID) {
CTService.getMultiNativeAds(1, nativeID, mContext, CTImageRatioType.RATIO_19_TO_10,new MultiAdsEventListener(){
public void onMultiNativeAdsSuccessful(List<CTAdvanceNative> res) {
if (res != null && res.size()>0) {
rl_cloud.setVisibility(View.VISIBLE);
CTAdvanceNative dataItem = res.get(0);
if (!TextUtils.isEmpty(dataItem.getIconUrl())){
Picasso.with(mContext).load(dataItem.getIconUrl()).placeholder(R.drawable.ic_launcher).into(cloud_icon);
}
dataItem.registeADClickArea(rl_cloud);
}
}
public void onAdviewGotAdFail(CTNative result) {
}
@Override
public void onAdviewClicked(CTNative result) {
super.onAdviewClicked(result);
}
});
}
注意:
1)、添加jar包、
2)、初始化: CTService.init(this,”“);
3)、权限:
4)、清单文件: