Package com.my.target.nativeads
Interface INativeAd
-
- All Known Implementing Classes:
NativeAd,NativeBannerAd
public interface INativeAd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAdChoicesPlacement()Retrieve current position for AdChoices iconintgetCachePolicy()Retrieve current cachePolicy set previouslyvoidhandleData(java.lang.String data)Loads data for s2s partnersvoidload()Start loading ads.voidloadFromBid(java.lang.String bidId)Start loading ad with the bidding IDvoidregisterView(android.view.View view)Registration of the Advertising view.voidregisterView(android.view.View view, java.util.List<android.view.View> clickableViews)Registration of the Advertising view.voidsetAdChoicesPlacement(int adChoicesPlacement)Sets the place for AdChoices icon, by default used top-right positionvoidsetCachePolicy(int cachePolicy)By default, images and videos are preloaded.voidunregisterView()View de-registration.
-
-
-
Method Detail
-
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 neededCachePolicy
-
getCachePolicy
int getCachePolicy()
Retrieve current cachePolicy set previously- Returns:
- current cachePolicy
- See Also:
CachePolicy
-
getAdChoicesPlacement
int getAdChoicesPlacement()
Retrieve current position for AdChoices icon- Returns:
- current adChoicesPlacement
- See Also:
AdChoicesPlacement
-
setAdChoicesPlacement
void setAdChoicesPlacement(int adChoicesPlacement)
Sets the place for AdChoices icon, by default used top-right position- Parameters:
adChoicesPlacement- position- See Also:
AdChoicesPlacement
-
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
void loadFromBid(@NonNull java.lang.String bidId)Start loading ad with the bidding ID- Parameters:
bidId- bidding ID
-
registerView
void registerView(@NonNull android.view.View view, @Nullable java.util.List<android.view.View> clickableViews)Registration 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
void registerView(@NonNull android.view.View view)Registration 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
void handleData(@NonNull java.lang.String data)Loads data for s2s partners- Parameters:
data- s2s data
-
-