Skip to content

Banner Ads API

CMAdSDK edited this page May 18, 2016 · 14 revisions

-com.cmcm.adsdk.banner.CMNativeBannerView

Methodology Method Introduction
setPosid(String posid) Set ad position id
setAdSize(CMBannerSize size) Set banner size
setAdListener(CMBannerAdListener listener) Set banner callback interface
loadAd() downloading ad
prepare() after the success of the load needs to display ads invoke this method

-com.cmcm.adsdk.banner.CMBannerAdSize

Parameter Name Parameters description
CMBannerAdSize.BANNER_320_50 320 * 50 size
CMBannerAdSize.BANNER_300_250 320 * 250 size

-com.cmcm.adsdk.banner.CMBannerAdListener

Methodology Method Introduction
onAdLoaded(CMAdView view) ad request success
adFailedToLoad(CMAdView view, int error) ad request failure
onAdClicked(CMAdView view) ad click

Clone this wiki locally