Interface INativeAd

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getAdChoicesPlacement()
      Retrieve current position for AdChoices icon
      int getCachePolicy()
      Retrieve current cachePolicy set previously
      void handleData​(java.lang.String data)
      Loads data for s2s partners
      void load()
      Start loading ads.
      void loadFromBid​(java.lang.String bidId)
      Start loading ad with the bidding ID
      void registerView​(android.view.View view)
      Registration of the Advertising view.
      void registerView​(android.view.View view, java.util.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 unregisterView()
      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 needed CachePolicy
      • 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 onNoAd

        Ad 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 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
                        java.lang.String data)
        Loads data for s2s partners
        Parameters:
        data - s2s data