Interface INativeAd

All Known Implementing Classes:
NativeAd, NativeBannerAd

public interface INativeAd
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieve current position for AdChoices icon
    int
    Retrieve current cachePolicy set previously
    void
    Loads data for s2s partners
    void
    Start loading ads.
    void
    Start loading ad with the bidding ID
    void
    registerView(android.view.View view)
    Registration of the Advertising view.
    void
    registerView(android.view.View view, List<android.view.View> clickableViews)
    Registration of the Advertising view.
    void
    setAdChoicesPlacement(int adChoicesPlacement)
    Sets the place for AdChoices icon, by default used top-right position
    void
    setCachePolicy(int cachePolicy)
    By default, images and videos are preloaded.
    void
    View de-registration.
  • Method Details

    • getCachePolicy

      int getCachePolicy()
      Retrieve current cachePolicy set previously
      Returns:
      current cachePolicy
      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 needed CachePolicy
    • getAdChoicesPlacement

      int getAdChoicesPlacement()
      Retrieve current position for AdChoices icon
      Returns:
      current adChoicesPlacement
      See Also:
    • setAdChoicesPlacement

      void setAdChoicesPlacement(int adChoicesPlacement)
      Sets the place for AdChoices icon, by default used top-right position
      Parameters:
      adChoicesPlacement - position
      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 onNoAd

      Ad listener should be added before this call

    • loadFromBid

      void loadFromBid(@NonNull String bidId)
      Start loading ad with the bidding ID
      Parameters:
      bidId - bidding ID
    • registerView

      void registerView(@NonNull android.view.View view, @Nullable List<android.view.View> clickableViews)
      Registration of the Advertising view. Must be called before showing the ad
      Parameters:
      view - Advertising view
      clickableViews - 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 String data)
      Loads data for s2s partners
      Parameters:
      data - s2s data