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

        @Deprecated(message = "Please use InMobiSdk.getToken() instead.", replaceWith = @ReplaceWith(imports = {"com.inmobi.ads.InMobiSdk"}, expression = "InMobiSdk.getToken()"), level = DeprecationLevel.WARNING) 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.

      • show

        @UiThread() final Unit show(Context context)

        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.

        Parameters:
        context - Activity Context in which the interstitial has to be shown
      • isReady

         final Boolean isReady()

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

        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.

      • notifyWin

         final Unit notifyWin(Double minBidToWin)

        Notify the SDK that the bid for this ad was won. This should be called only once per ad

      • notifyLoss

         final Unit notifyLoss(Integer lossReason, Double auctionPrice)

        Notify the SDK that the bid for this ad was lost. This should be called only once per ad

        Parameters:
        lossReason - Represents the reason code for losing the auction
        auctionPrice - Represents the price of the winning bid