public interface INativeAdFactory
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Cleans up any used resources
|
NativeAd |
getAd(int position,
int itemCount)
Returns an ad if there are ads and one should be shown to the user.
|
AdListener |
getAdListener()
Returns the event listener.
|
int |
getCount(int itemCount)
Gets the total count of items and ads.
|
boolean |
isAdShownAt(int position)
Returns whether an ad was rendered at the specified position (including previous rendered ads).
|
void |
setAdListener(AdListener adListener)
Sets the listener for events related to loading native ads.
|
boolean |
shouldShowAd(int position,
int itemCount)
Returns whether an ad should to shown to the user at the specified position considering there
will the specified total number of items.
|
int |
totalAdsShown()
Return the total number of ads that have been rendered thus far.
|
boolean shouldShowAd(int position, int itemCount)
position
- current position (including ads)itemCount
- total number of items (excluding ads)NativeAd getAd(int position, int itemCount)
position
- current position (including ads)itemCount
- total number of items (excluding ads)boolean isAdShownAt(int position)
position
- position include adsint totalAdsShown()
int getCount(int itemCount)
itemCount
- total number of items (excluding ads)void setAdListener(AdListener adListener)
adListener
- listenerAdListener getAdListener()
void destroy()