Package 

Class InMobiInterstitial

    • Constructor Detail

      • InMobiInterstitial

        InMobiInterstitial(Context context, Long placementId, InterstitialAdEventListener listener)
        Parameters:
        context - Represents the context where the interstitial is going to be shown
        placementId - Represents the placement-ID of the interstitial ad
        listener - Represents the listener to get callbacks for the lifecycle of the ad
    • Method Detail

      • setKeywords

         final Unit setKeywords(String keywords)

        Set comma delimited keywords for targeting purpose

        Parameters:
        keywords - comma delimited keywords for targeting purpose
      • getSignals

         final Unit getSignals()

        Called to create the request payload & the value is returned in InterstitialAdEventListener.onRequestPayloadCreated callback on success, and in case of failure InterstitialAdEventListener.onRequestPayloadCreationFailed is invoked.

      • load

         final Unit load(ByteArray response)

        Called to render the ad with the provided response. Once the SDK starts loading the provided response, it will start giving callbacks through InterstitialAdEventListener listener.

        Parameters:
        response - Represents the response to be used to render an ad
      • load

        @UiThread() final Unit load()

        Submit a request to load ad content. This method returns immediately upon enqueuing a request. Your application shall be notified of the result on the InterstitialAdEventListener callback.

        Note** This method must be called on the UI thread. Failure to do so will affect your ability to monetize with the InMobi Ad SDK.

      • show

        @UiThread() final Unit show()

        Show the interstitial ad. Call this method after receiving the callback

        Note** This method must be called on the UI thread. Failure to do so will affect your ability to monetize with the InMobi Ad SDK.

      • isReady

         final Boolean isReady()

        Returns true if the interstitial was loaded successfully and in ready to be shown.

      • setExtras

         final Unit setExtras(Map<String, String> extras)

        Set any additional custom parameters that will be sent in the ad request.

        Parameters:
        extras - Additional custom parameters that will be sent in the ad request.
      • setContentUrl

         final Unit setContentUrl(String contentUrl)

        Set the current context of the app.

        Parameters:
        contentUrl -
        • Represents the contentUrl of the app

      • setWatermarkData

         final Unit setWatermarkData(WatermarkData watermarkData)

        Sets an Ad Identification Overlay on top of the Ad.

        Parameters:
        watermarkData -
        • Data for the overlay. Needs a Base64 encoded overlay image String.

      • setupAdUnit

         final Unit setupAdUnit(InterstitialAdUnit interstitialAdUnit)