Class MyTargetNativeAdAdapter

    • Constructor Detail

      • MyTargetNativeAdAdapter

        public MyTargetNativeAdAdapter()
    • Method Detail

      • setSection

        public void setSection​(@Nullable
                               NativeAdSection section)
      • registerView

        public void registerView​(@NonNull
                                 android.view.View view,
                                 @Nullable
                                 java.util.List<android.view.View> clickableViews,
                                 int adChoicesPlacement)
        Description copied from interface: MediationNativeAdAdapter
        Will be called when view becomes ready to be shown. There must be called apis to start tracking views, adding listeners on views and load resources, which was not loaded previously, such as not pre-loaded media content. Clickable views is optional, if set - click listeners must be placed only on views in this list, otherwise must be used default logic of ad network
        Specified by:
        registerView in interface MediationNativeAdAdapter
        Parameters:
        view - view to be registered
        clickableViews - optional views want to be clickable
        adChoicesPlacement - placement of AdChoices icon. Possible values in AdChoicesPlacement
      • getMediaView

        @Nullable
        public android.view.View getMediaView​(@NonNull
                                              android.content.Context context)
        Description copied from interface: MediationNativeAdAdapter
        Must return view for displaying media view (large picture or video) for correct implementation of Native Ads and tracking. It is optional, but preferred.
        Specified by:
        getMediaView in interface MediationNativeAdAdapter
        Parameters:
        context - app context
        Returns:
        View for Media
      • destroy

        public void destroy()
        Description copied from interface: MediationAdapter
        Destroys adapter and cleans resources. Adapter will not work after calling this method
        Specified by:
        destroy in interface MediationAdapter