Class InMobiBanner
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
public final class InMobiBanner extends RelativeLayout
Use this class to integrate banner 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 Class Summary
Nested Classes Modifier and Type Class Description public enum
InMobiBanner.AnimationType
Enumeration for the view transitions during a banner ad refresh.
-
Field Summary
Fields Modifier and Type Field Description private final PreloadManager
preloadManager
-
Constructor Summary
Constructors Constructor Description InMobiBanner(Context context, AttributeSet attributeSet)
Construct an InMobiBanner instance from XML layouts. InMobiBanner(Context context, Long placementId)
Construct an InMobiBanner instance.
-
Method Summary
Modifier and Type Method Description final PreloadManager
getPreloadManager()
Method to get the PreloadManager object in order to preload or load a preloaded ad. final Long
getPlacementId()
Returns placementId that is passed as a parameter in the Constructor or set as part of XML tag. final Unit
getSignals()
Called to create the request payload & the value is returned in BannerAdEventListener.onRequestPayloadCreated callback on success, and in case of failure BannerAdEventListener.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
load(Context context)
Submit a request to load ad content. final Unit
setExtras(Map<String, String> extras)
Set any additional custom parameters that will be sent in the ad request. final Unit
setKeywords(String keywords)
Set comma delimited keywords for targeting purpose final Unit
setContentUrl(String contentUrl)
Set the current context of the app. final Unit
setListener(BannerAdEventListener listener)
Set a listener to be notified of lifecycle events for the InMobiBanner instance. final Unit
setEnableAutoRefresh(Boolean enabled)
Control if the banner should auto-refresh ad content. final Unit
setRefreshInterval(Integer refreshInterval)
Specify the refresh interval for the banner ad. final Unit
setAnimationType(InMobiBanner.AnimationType animationType)
Set the animation preference on the banner views during ad refresh. final Unit
disableHardwareAcceleration()
Turn off hardware acceleration on the underlying views. final Unit
setWatermarkData(WatermarkData watermarkData)
Sets an Ad Identification Overlay on top of the Ad. final Unit
setBannerSize(@IntRange(from = 1) Integer widthInDp, @IntRange(from = 1) Integer heightInDp)
Set the width and height of Banner. final Unit
setupBannerSizeObserver()
Unit
onWindowFocusChanged(Boolean hasWindowFocus)
final Unit
resume()
Resumes an InMobiBanner ad after a previous call to . final Unit
pause()
Pauses any extra processing associated with this InMobiBanner ad. final Unit
setAudioListener(AudioListener audioListener)
Sets AudioListener to listen to AudioStatus change events in InMobiBanner instance. final Boolean
isAudioAd()
Returns true if the InMobiBanner has loaded an Audio ad in it's instance. final Unit
destroy()
Method to kill the InMobiBanner object. -
Methods inherited from class android.view.View
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateDisplayHash, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHandwritingBoundsOffsets, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw
-
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout
-
Methods inherited from class android.widget.RelativeLayout
generateLayoutParams, getAccessibilityClassName, getBaseline, getGravity, getIgnoreGravity, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
InMobiBanner
InMobiBanner(Context context, AttributeSet attributeSet)
Construct an InMobiBanner instance from XML layouts.- Parameters:
context
- Represents the context where the banner is going to be shownattributeSet
- Represents the AttributeSet properties of banner in XML
-
InMobiBanner
InMobiBanner(Context context, Long placementId)
Construct an InMobiBanner instance.- Parameters:
context
- Represents the context where the banner is going to be shownplacementId
- Represents the placement-ID of the banner ad
-
-
Method Detail
-
getPreloadManager
final PreloadManager getPreloadManager()
Method to get the PreloadManager object in order to preload or load a preloaded ad.
- Returns:
an instance of PreloadManager
-
getPlacementId
final Long getPlacementId()
Returns placementId that is passed as a parameter in the Constructor or set as part of XML tag.
- Returns:
Long
-
getSignals
final Unit getSignals()
Called to create the request payload & the value is returned in BannerAdEventListener.onRequestPayloadCreated callback on success, and in case of failure BannerAdEventListener.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 BannerAdEventListener 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 BannerAdEventListener 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.
-
load
@UiThread() final Unit load(Context context)
Submit a request to load ad content. Use this method in order to change the context where the ad needs to originally load.
- Parameters:
context
- the Context where the ad will be rendered.
-
setExtras
final Unit setExtras(Map<String, String> extras)
Set any additional custom parameters that will be sent in the ad request.
- Parameters:
extras
- Represents the extras
-
setKeywords
final Unit setKeywords(String keywords)
Set comma delimited keywords for targeting purpose
- Parameters:
keywords
- Represents the keywords
-
setContentUrl
final Unit setContentUrl(String contentUrl)
Set the current context of the app.
- Parameters:
contentUrl
-Represents the contentUrl of the app
-
setListener
final Unit setListener(BannerAdEventListener listener)
Set a listener to be notified of lifecycle events for the InMobiBanner instance.
- Parameters:
listener
- Represents the listener to provide callbacks
-
setEnableAutoRefresh
final Unit setEnableAutoRefresh(Boolean enabled)
Control if the banner should auto-refresh ad content.
- Parameters:
enabled
-true
if banner should auto-refresh, otherwisefalse
-
setRefreshInterval
final Unit setRefreshInterval(Integer refreshInterval)
Specify the refresh interval for the banner ad.
- Parameters:
refreshInterval
- Represents the interval at which the banner ad will refresh
-
setAnimationType
final Unit setAnimationType(InMobiBanner.AnimationType animationType)
Set the animation preference on the banner views during ad refresh.
-
disableHardwareAcceleration
final Unit disableHardwareAcceleration()
Turn off hardware acceleration on the underlying views.
-
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.
-
setBannerSize
final Unit setBannerSize(@IntRange(from = 1) Integer widthInDp, @IntRange(from = 1) Integer heightInDp)
Set the width and height of Banner. These values should be same as layout dimensions.
- Parameters:
widthInDp
- width of Banner in DPheightInDp
- height of Banner in DP
-
setupBannerSizeObserver
final Unit setupBannerSizeObserver()
-
onWindowFocusChanged
Unit onWindowFocusChanged(Boolean hasWindowFocus)
-
resume
final Unit resume()
Resumes an InMobiBanner ad after a previous call to .pause. Your app must call this method in the
onResume
method of the containing activity or fragment.You only need to call this method if you supplied a non-
Activity
context while creating your banner ad unit, or if you called the .load method on the InMobiBanner instance.
-
pause
final Unit pause()
Pauses any extra processing associated with this InMobiBanner ad. Your app must call this method in the
onPause
method of the containing activity or fragment.You only need to call this method if you supplied a non-
Activity
context while creating your banner ad unit, or if you called the .load method on the InMobiBanner instance.
-
setAudioListener
final Unit setAudioListener(AudioListener audioListener)
Sets AudioListener to listen to AudioStatus change events in InMobiBanner instance.
- Parameters:
audioListener
- AudioListener
-
isAudioAd
final Boolean isAudioAd()
Returns true if the InMobiBanner has loaded an Audio ad in it's instance.
Note: Call this function after receiving BannerAdEventListener.onAdLoadSucceeded else would return a default value of false.
- Returns:
Boolean
-
destroy
@UiThread() final Unit destroy()
Method to kill the InMobiBanner object. This will do the following -
Remove the ad-view from the view hierarchy
Cancel any ongoing refresh
De-reference the listeners
Other clean-ups
-
-
-
-