Package

## Class InMobiInterstitial

- All Implemented Interfaces:

      public final class InMobiInterstitial

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `private final PreloadManager` | `preloadManager` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InMobiInterstitial(Context context, Long placementId, InterstitialAdEventListener listener)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `final PreloadManager` | `getPreloadManager()` | Instance of PreloadManager object in order to preload or load a preloaded ad.
    `final Unit` | `setListener(InterstitialAdEventListener listener)` | Set a listener to be notified of lifecycle events for the InMobiInterstitial instance.
    `final Unit` | `setKeywords(String keywords)` | Set comma delimited keywords for targeting purpose
    `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.
    `final Unit` | `load(ByteArray response)` | Called to render the ad with the provided response.
    `final Unit` | `load()` | Submit a request to load ad content.
    `final Unit` | `loadAdUnit()` |
    `final Unit` | `show()` | Show the interstitial ad.
    `final Boolean` | `isReady()` | Returns `true` if the interstitial was loaded successfully and in ready to be shown.
    `final Unit` | `setExtras(Map<String, String> extras)` | Set any additional custom parameters that will be sent in the ad request.
    `final Unit` | `setContentUrl(String contentUrl)` | Set the current context of the app.
    `final Unit` | `disableHardwareAcceleration()` | Disable hardware acceleration on the underlying views.
    `final Unit` | `setupAdUnit(InterstitialAdUnit interstitialAdUnit)` |
    `final Unit` | `handledLoadFailedCallback(InMobiAdRequestStatus status)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

    - #### getPreloadManager

           final PreloadManager getPreloadManager()

      Instance of PreloadManager object in order to preload or load a preloaded ad.

    - #### setListener

           final Unit setListener(InterstitialAdEventListener listener)

      Set a listener to be notified of lifecycle events for the InMobiInterstitial instance.

      Parameters:
        `listener` - Represents the listener to provide callbacks

    - #### 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.

    - #### loadAdUnit

           final Unit loadAdUnit()

    - #### 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

    - #### disableHardwareAcceleration

           final Unit disableHardwareAcceleration()

      Disable hardware acceleration on the underlying views.

    - #### setupAdUnit

           final Unit setupAdUnit(InterstitialAdUnit interstitialAdUnit)

    - #### handledLoadFailedCallback

           final Unit handledLoadFailedCallback(InMobiAdRequestStatus status)