public final class InMobiInterstitial
extends java.lang.Object
Note This class is not thread-safe. All methods on instances of this class must be called on the UI thread.
Modifier and Type | Class and Description |
---|---|
static class |
InMobiInterstitial.InterstitialCallbacks |
Constructor and Description |
---|
InMobiInterstitial(android.content.Context context,
long placementId,
InterstitialAdEventListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
disableHardwareAcceleration()
Disable hardware acceleration on the underlying views.
|
org.json.JSONObject |
getAdMetaInfo()
Deprecated.
|
java.lang.String |
getCreativeId()
Deprecated.
|
PreloadManager |
getPreloadManager()
Method to get the
PreloadManager object in order to preload or load a preloaded ad. |
void |
getSignals()
Called to create the request payload & the value is returned in
AdEventListener.onRequestPayloadCreated(byte[]) callback on success, and
in case of failure
AdEventListener.onRequestPayloadCreationFailed(InMobiAdRequestStatus)
is invoked. |
boolean |
isReady()
Returns
true if the interstitial was loaded successfully and in ready to be shown. |
void |
load()
Submit a request to load ad content.
|
void |
load(byte[] response)
Called to render the ad with the provided response.
|
void |
setExtras(java.util.Map<java.lang.String,java.lang.String> extras)
Set any additional custom parameters that will be sent in the ad request.
|
void |
setKeywords(java.lang.String keywords)
Set comma delimited keywords for targeting purpose
|
void |
setListener(InterstitialAdEventListener listener)
Set a listener to be notified of lifecycle events for the
InMobiInterstitial instance. |
void |
show()
Show the interstitial ad.
|
void |
show(int enterAnimationResourcedId,
int exitAnimationResourceId)
Deprecated.
|
public InMobiInterstitial(android.content.Context context, long placementId, InterstitialAdEventListener listener) throws SdkNotInitializedException
context
- Represents the context where the interstitial is going to be shownplacementId
- Represents the placement-ID of the interstitial adlistener
- Represents the listener to get callbacks for the lifecycle of the adSdkNotInitializedException
- If the IM-SDK was not initialized before creating ad objectpublic void setListener(InterstitialAdEventListener listener)
InMobiInterstitial
instance.listener
- Represents the listener to provide callbackspublic void setKeywords(java.lang.String keywords)
keywords
- comma delimited keywords for targeting purposepublic void getSignals()
AdEventListener.onRequestPayloadCreated(byte[])
callback on success, and
in case of failure
AdEventListener.onRequestPayloadCreationFailed(InMobiAdRequestStatus)
is invoked.public PreloadManager getPreloadManager()
PreloadManager
object in order to preload or load a preloaded ad.PreloadManager
public void load(byte[] response)
InterstitialAdEventListener
listener.response
- Represents the response to be used to render an adpublic void load()
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.
public void show()
InterstitialAdEventListener#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.
@Deprecated public void show(int enterAnimationResourcedId, int exitAnimationResourceId)
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.
enterAnimationResourcedId
- exitAnimationResourceId
- public boolean isReady()
true
if the interstitial was loaded successfully and in ready to be shown.true
if the interstitial was loaded successfully and in ready to be shown.@Deprecated public org.json.JSONObject getAdMetaInfo()
AdMetaInfo.getBidInfo()
in
InterstitialAdEventListener#onAdFetchSuccessful(InMobiInterstitial, AdMetaInfo)
or
InterstitialAdEventListener.onAdDisplayed(InMobiInterstitial, AdMetaInfo)
instead.
Returns meta info about Ad if any such info is available otherwise returns empty JSONObject
@Deprecated public java.lang.String getCreativeId()
AdMetaInfo.getCreativeID()
in
InterstitialAdEventListener#onAdFetchSuccessful(InMobiInterstitial, AdMetaInfo)
or
InterstitialAdEventListener.onAdDisplayed(InMobiInterstitial, AdMetaInfo)
instead.
Returns creativeId if the interstitial was loaded successfully and creativeId is available otherwise returns empty string.
public void setExtras(java.util.Map<java.lang.String,java.lang.String> extras)
extras
- Additional custom parameters that will be sent in the ad request.public void disableHardwareAcceleration()