Class NativeBannerAdLoader

  • All Implemented Interfaces:

    
    public final class NativeBannerAdLoader
    extends BaseAd
                        

    Allows you to load from 1 to 20 banners per one request. You can configure all the same settings that are available for customization in NativeBannerAd (for example, user's gender and age, autoloading images and videos). There is no guarantee that the number of banners specified in the COUNT parameter will be loaded - this parameter indicates the maximum number of banners that you want to receive.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getCachePolicy() Retrieve current cachePolicy
      NativeBannerAdLoader load() Method responsible for loading data.
      static NativeBannerAdLoader newLoader(int slotId, int bannersCount, @NonNull() Context context) The static constructor of the object.
      static NativeBannerAdLoader newLoader(int slotId, int bannersCount, @NonNull() Context context, @NonNull() MenuFactory menuFactory) The static constructor of the object.
      void setCachePolicy(int cachePolicy) By default, images and videos are preloaded.
      NativeBannerAdLoader setOnLoad(@Nullable() NativeBannerAdLoader.OnLoad onLoad) Set listener for loading event
      • Methods inherited from class com.my.target.common.BaseAd

        getCustomParams, getTag, getWebFormClient, setAdNetworkConfig, setTag, setWebFormClient
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • load

        @NonNull()@UiThread() NativeBannerAdLoader load()

        Method responsible for loading data. In case of successful loading, the onLoad method will be called on the object passed as a listener>

      • newLoader

        @NonNull() static NativeBannerAdLoader newLoader(int slotId, int bannersCount, @NonNull() Context context)

        The static constructor of the object.

        Parameters:
        slotId - slot number
        bannersCount - maximum number of banners that you want to receive.
        context - application context
        Returns:

        NativeBannerAdLoader object

      • newLoader

        @NonNull() static NativeBannerAdLoader newLoader(int slotId, int bannersCount, @NonNull() Context context, @NonNull() MenuFactory menuFactory)

        The static constructor of the object.

        Parameters:
        slotId - slot number
        bannersCount - maximum number of banners that you want to receive.
        context - application context
        menuFactory - menuFactory
        Returns:

        NativeBannerAdLoader object

      • 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 Value is ALL, IMAGE, VIDEO, NONE, or AUDIO