Skip to content

Native Ads API

CMAdSDK edited this page May 18, 2016 · 29 revisions

####SDK Base Version API

com.cmcm.adsdk.nativead.NativeAdManagerMini

|+Methodology **Method Introduction**
NativeAdManagerMini(Context context, String posid) NativaAdManagerMini construct function
setNativeAdListener(INativeAdLoaderListener listener) set callback interface
loadAd( ) concurrent load ads
preloadAd( ) sequence load ads
getAd( ) get ads

com.cmcm.baseapi.ads.INativeAd

**Methodology** **Method Introduction**
getAdtitle() ad title
getAdBody() ad description
getAdIconUrl() ad icon url
getAdCoverImageUrl() ad background picture Url
getAdCallToAction() ad button text
getAdStarRating() ad star score(can be null)
getAdSocialContext() ad download amount or website(can be null)
hasExpired() check ad expired(true mean expired)
isDownLoadApp() check download type app (true: yes false: no null: no information
setImpressionListener(ImpressionListener listener) set callback after SDK ad impression report
registerViewForInteraction(View view) bundle ad view with ad itself(requested)
unregisterView() unbundling ad view with ad itself(requested)

####SDK Ext Version API

com.cmcm.adsdk.nativead.NativeAdManagerEx

**Methodology** **Method Introduction**
NativeAdManagerEx(Context context, String posid) NativaAdManagerEx construct function
setNativeAdListener(INativeAdLoaderListener listener) set callback interface
loadAd( ) concurrent load ads
preloadAd( ) sequence load ads
getAd( ) get ads

com.cmcm.baseapi.ads.INativeAd

**Methodology** **Method Introduction**
getAdtitle() ad title
getAdBody() ad description
getAdIconUrl() ad icon url
getAdCoverImageUrl() ad background picture Url
getAdCallToAction() ad button text
getAdStarRating() ad star score(can be null)
getAdSocialContext() ad download amount or website(can be null)
hasExpired() check ad expired(true mean expired)
isDownLoadApp() check download type app (true: yes false: no null: no information
setImpressionListener(ImpressionListener listener) set callback after SDK ad impression report
registerViewForInteraction(View view) bundle ad view with ad itself(requested)
unregisterView() unbundling ad view with ad itself(requested)

Clone this wiki locally