java.lang.Object | |
↳ | com.inmobi.ads.InMobiInterstitial |
Use this class to integrate full screen, interstitial ads in your application.
Note This class is not thread-safe. All methods on instances of this class must be called on the UI thread.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
InMobiInterstitial.InterstitialAdListener2 | Listener for receiving notifications during the lifecycle of an interstitial. | ||||||||||
InMobiInterstitial.InterstitialAdRequestListener | A listener to notify the outcome of a prefetch ad request. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Disable hardware acceleration on the underlying views.
| |||||||||||
Returns bid info about Ad if console open bid info available otherwise returns 0
| |||||||||||
Returns meta info about Ad if any such info is available otherwise returns empty
JSONObject | |||||||||||
Returns creativeId if the interstitial was loaded successfully and creativeId is available
otherwise returns empty string.
| |||||||||||
Called to create the request payload & the value is returned in
onRequestPayloadCreated(byte[]) callback on success, and
in case of failure
onRequestPayloadCreationFailed(InMobiAdRequestStatus)
is invoked. | |||||||||||
Returns
true if the interstitial was loaded successfully and in ready to be shown. | |||||||||||
Submit a request to load ad content.
| |||||||||||
Called to render the ad with the provided response.
| |||||||||||
Request for an interstitial ad.
| |||||||||||
Set any additional custom parameters that will be sent in the ad request.
| |||||||||||
Set a listener to be notified of lifecycle events for the
InMobiInterstitial
instance. | |||||||||||
Set comma delimited keywords for targeting purpose
| |||||||||||
Set a listener to be notified of lifecycle events for the
InMobiInterstitial instance. | |||||||||||
Show the interstitial ad.
| |||||||||||
Show the interstitial ad.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Disable hardware acceleration on the underlying views.
Returns bid info about Ad if console open bid info available otherwise returns 0
Returns meta info about Ad if any such info is available otherwise returns empty JSONObject
Returns creativeId if the interstitial was loaded successfully and creativeId is available otherwise returns empty string.
Called to create the request payload & the value is returned in
onRequestPayloadCreated(byte[])
callback on success, and
in case of failure
onRequestPayloadCreationFailed(InMobiAdRequestStatus)
is invoked.
Returns true
if the interstitial was loaded successfully and in ready to be shown.
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 InMobiInterstitial.InterstitialAdListener2
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.
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.
response | Represents the response to be used to render an ad |
---|
Request for an interstitial ad. Use this method to prefetch interstitial ads in your application. This method
returns immediately after submitting a request. You will be notified via the InMobiInterstitial.InterstitialAdRequestListener
implementation that you supply in this call when the ad request completes.
Note: This method keeps a weak reference to the InMobiInterstitial.InterstitialAdRequestListener
instance and will
be garbage collected if you do not keep a strong reference to it. To receive callbacks when an request is
completed caller should keep strong reference of InMobiInterstitial.InterstitialAdRequestListener
.
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.
context | any Context implementation |
---|---|
adRequest | an InMobiAdRequest to help customize the ad request |
interstitialAdRequestListener | an InMobiInterstitial.InterstitialAdRequestListener implementation that will be called
when the ad request completes.
|
Set any additional custom parameters that will be sent in the ad request.
Set a listener to be notified of lifecycle events for the InMobiInterstitial
instance. Use setListener(InterstitialAdEventListener)
instead.
Note This method will no longer be supported from the next major version
listener | Represents the listener to provide callbacks |
---|
Set comma delimited keywords for targeting purpose
Set a listener to be notified of lifecycle events for the InMobiInterstitial
instance.
listener | Represents the listener to provide callbacks |
---|
Show the interstitial ad. This method allows your application to set the transition animation when the ad is shown to the user. If an invalid value of enter or exit animation id is provided the default animations of the platform will be used. In order to disable enter/exit animations please pass 0 as the animation id.
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 the interstitial ad. Call this method after receiving the callback onAdLoadSucceeded(InMobiInterstitial)
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.