Interface InstreamAd.InstreamAdListener

  • Enclosing class:
    InstreamAd

    public static interface InstreamAd.InstreamAdListener
    • Method Detail

      • onLoad

        void onLoad​(@NonNull
                    InstreamAd ad)
        Will be called if the ad is loaded successfully.
        Parameters:
        ad - current ad instance
      • onNoAd

        void onNoAd​(@NonNull
                    java.lang.String reason,
                    @NonNull
                    InstreamAd ad)
        Will be called if the ad was not found.
        Parameters:
        reason - of no ads
        ad - current ad instance
      • onError

        void onError​(@NonNull
                     java.lang.String reason,
                     @NonNull
                     InstreamAd ad)
        Will be called in case of any error in the ad displaying process.
        Parameters:
        reason - reason for error
        ad - current ad instance
      • onBannerTimeLeftChange

        void onBannerTimeLeftChange​(float timeLeft,
                                    float duration,
                                    @NonNull
                                    InstreamAd ad)
        Will be called multiple times for each banner between the onBannerStart and onBannerComplete events.
        Parameters:
        timeLeft - ad video left time in seconds
        duration - duration of ad video in seconds
        ad - current ad instance
      • onComplete

        void onComplete​(@NonNull
                        java.lang.String section,
                        @NonNull
                        InstreamAd ad)
        Will be called when the ad video section completes
        Parameters:
        section - the name of completed video ad section
        ad - current ad instance
      • onBannerShouldClose

        void onBannerShouldClose()
        The method will be called when the ad should be closed when the adchoice item is clicked, for this, in the implementation of this method, you need to call instreamAd.skip()