Package com.my.target.nativeads
Interface IAd
- All Known Subinterfaces:
INativeAd,INativeBannerAd
- All Known Implementing Classes:
NativeAd,NativeBannerAd
public interface IAd
-
Method Summary
Modifier and TypeMethodDescriptionintRetrieve current position for AdChoices iconintRetrieve current cachePolicy set previouslyvoidhandleData(String data) Loads data for s2s partnersvoidload()Start loading ads.voidloadFromBid(String bidId) Start loading ad with the bidding IDvoidregisterView(android.view.View view) Deprecated.voidregisterView(android.view.View view, List<android.view.View> clickableViews) Deprecated.useNativeAd#registerView(NativeAdViewBinder)orNativeBannerAd#registerView(NativeBannerAdViewBinder)depending on which class you are usingvoidsetAdChoicesPlacement(int adChoicesPlacement) Sets the place for AdChoices icon, by default used top-right positionvoidsetCachePolicy(int cachePolicy) By default, images and videos are preloaded.voidView de-registration.
-
Method Details
-
getCachePolicy
int getCachePolicy()Retrieve current cachePolicy set previously- Returns:
- current cachePolicy
Value is
CachePolicy.ALL,CachePolicy.IMAGE,CachePolicy.VIDEO, orCachePolicy.NONE - See Also:
-
setCachePolicy
void setCachePolicy(int cachePolicy) By default, images and videos are preloaded. You can turn off the automatic loading of images and videos, but keep in mind that downloading them will take extra time, which will create an additional delay in displaying ads in your application.- Parameters:
cachePolicy- cache policy neededCachePolicyValue isCachePolicy.ALL,CachePolicy.IMAGE,CachePolicy.VIDEO, orCachePolicy.NONE
-
getAdChoicesPlacement
int getAdChoicesPlacement()Retrieve current position for AdChoices icon- Returns:
- current adChoicesPlacement
Value is
AdChoicesPlacement.TOP_RIGHT,AdChoicesPlacement.TOP_LEFT,AdChoicesPlacement.BOTTOM_RIGHT,AdChoicesPlacement.BOTTOM_LEFT,AdChoicesPlacement.MANUAL, orAdChoicesPlacement.DRAWING_MANUAL - See Also:
-
setAdChoicesPlacement
void setAdChoicesPlacement(int adChoicesPlacement) Sets the place for AdChoices icon, by default used top-right position- Parameters:
adChoicesPlacement- position Value isAdChoicesPlacement.TOP_RIGHT,AdChoicesPlacement.TOP_LEFT,AdChoicesPlacement.BOTTOM_RIGHT,AdChoicesPlacement.BOTTOM_LEFT,AdChoicesPlacement.MANUAL, orAdChoicesPlacement.DRAWING_MANUAL- See Also:
-
load
void load()Start loading ads. In case of successful loading, the onLoad method will be called on the object passed as a listener, in case of loading error or if there is no advertisement to be shown - the onNoAdAd listener should be added before this call
-
loadFromBid
Start loading ad with the bidding ID- Parameters:
bidId- bidding ID
-
registerView
Deprecated.useNativeAd#registerView(NativeAdViewBinder)orNativeBannerAd#registerView(NativeBannerAdViewBinder)depending on which class you are usingRegistration of the Advertising view. Must be called before showing the ad- Parameters:
view- Advertising viewclickableViews- specific clickable views inside Advertising view. If set, the only views in this list will be clickable. Otherwise, whole view will be clickable
-
registerView
Deprecated.useNativeAd#registerView(NativeAdViewBinder, List)orNativeBannerAd#registerView(NativeBannerAdViewBinder, List)depending on which class you are usingRegistration of the Advertising view. Must be called before showing the ad- Parameters:
view- Advertising view
-
unregisterView
void unregisterView()View de-registration. Stops timers, frees resources. Must be called after view is no longer needed -
handleData
Loads data for s2s partners- Parameters:
data- s2s data
-
NativeAd#registerView(NativeAdViewBinder, List)orNativeBannerAd#registerView(NativeBannerAdViewBinder, List)depending on which class you are using