public class Advantage
extends android.widget.RelativeLayout
ADvantage is a state-of-the-art, ad server-independent, rich media mobile advertising platform specifically designed for in-app advertisement enriched with multimedia content far beyond the usual spectrum of typical mobile advertising. The key arguments for using ADvantage are the following:
In a nutshell: ADvantage offers advertisers, publishers and users a new level of direct, interactive and state-of-the-art communication on mobile devices. There is no limit to creativity and passion for mobile advertising.
| Modifier and Type | Class and Description |
|---|---|
static class |
Advantage.ActivityState
Activity states that can be used
Advantage.ActivityState.PAUSE
Advantage.ActivityState.RESUME
|
static interface |
Advantage.OnCustomUrlListener
Notify the publisher when a new URL with custom protocol is about to be loaded in the current ADvantage WebView.
|
static interface |
Advantage.OnSocialAdListener
Notify the publisher when a new Social target is received.
|
android.widget.RelativeLayout.LayoutParamsandroid.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListenerABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUEFOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, IMPORTANT_FOR_CONTENT_CAPTURE_NO, IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_YES, IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z| Constructor and Description |
|---|
Advantage(android.app.Activity activity,
java.lang.String licenseKey,
java.lang.String siteId,
java.lang.String position)
Create a new instance of Advantage.
|
Advantage(android.content.Context context,
android.util.AttributeSet attrs)
Create a new instance of Advantage.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdserverParameter(java.lang.String key,
java.lang.String value)
To target advertisement for specific user groups (i.e.
|
void |
dispose()
Dispose the current instance of advantage and destroys the internal state of this
Advantage instance.
|
boolean |
getAllowAdWebViewToHandleScrollEvent()
Returns the touch listener's state of this view.
|
int |
getCornerAdHorizontalMargin() |
int |
getCornerAdVerticalMargin() |
java.lang.String |
getLicenseKey()
Returns a license key.
|
java.lang.String |
getPositionName()
Returns the banner's position name.
|
Enum.States |
getQueuedState()
This method returns queued state of the banner, necessary for corner ad
|
java.lang.String |
getSiteId()
Returns a site ID
|
boolean |
getSSLEnabled() |
static java.lang.String |
getVersion() |
int |
getVerticalScrollingThreshold()
Returns the vertical scrolling threshold.
|
int |
getVisibilityCheckInterval() |
boolean |
isSensitiveTargetingParamEnabled() |
boolean |
isVolumeObserverEnabled()
Returns the enabled status for the volume observer!
|
void |
loadData(java.lang.String data,
java.lang.String mimeType,
java.lang.String encoding)
As a fallback, you can load your offline content into the Advantage instance.
|
void |
onAdvertisingInfoFetched(com.google.android.gms.ads.identifier.AdvertisingIdClient.Info info) |
void |
onLicenseReceived(com.digitalsunray.advantage.License license,
Plugin plugin) |
void |
onScrollChanged() |
boolean |
registerCustomProtocol(java.util.List<java.lang.String> protocols,
Advantage.OnCustomUrlListener onCustomUrlListener)
Give the publisher application a chance to take over the control when a new URL with custom
protocol is about to be loaded in the current ADvantage WebView.
|
boolean |
removeAdserverParameter(java.lang.String key)
This method allows you to remove a specific targeting parameter from ad server targeting parameter's list.
|
void |
removeAllCookies()
Removes all cookies.
|
void |
removeEventHandler()
Removes the banner's predefined
event handler. |
void |
setActivityState(Advantage.ActivityState state)
Sets the current activity state.
|
void |
setAdWebViewBackgroundColor(int color)
Sets the background color for the Advantage instance.
|
void |
setAllowAdWebViewToHandleScrollEvent(boolean enabled)
Set the touch listener's state of this view.
|
void |
setAllowAdWebViewToHandleScrollEvent(boolean enabled,
int threshold)
Set the touch listener's state of this view.
|
void |
setAspectRatio(boolean enabled)
Set the aspect ration state of this view.
|
void |
setCloseIndicator(int resourceId)
Sets the close button's image.
|
void |
setCornerAdHorizontalMargin(int size)
Setting the horizontal margin (top and bottom) of the corner ad (small window)
|
void |
setCornerAdVerticalMargin(int size)
Setting the vertical margin (top and bottom) of the corner ad (small window)
|
void |
setDataProtectionRights(DataProtectionRight dpr) |
void |
setDebugEnabled(boolean enabled)
Set the debugging state of this view.
|
void |
setDefaultBackgroundViewGroup(android.view.ViewGroup defaultBackgroundViewGroup)
Sets the background view of this banner.
|
void |
setEventHandler(EventHandler eventHandler)
Adds banner's
event handler to detect updates and failures. |
void |
setFallbackAdaptor(AdvantageFallbackAdaptor fallbackAdaptor) |
void |
setLayoutParams(android.view.ViewGroup.LayoutParams params) |
void |
setLayoutTransition(android.animation.LayoutTransition transition) |
void |
setLicenseKey(java.lang.String licenseKey)
Set the user's license key
|
void |
setLoadingAnimationImageViewResourceId(int loadingAnimationImageViewResourceId)
Set the animation background to a given resource.
|
void |
setMaxDimension(Size size)
Sets maximum ad space size.
|
void |
setOnSocialAdListener(Advantage.OnSocialAdListener onSocialAdListener)
Give the publisher application a chance to listen to the new Social link targets.
|
void |
setPermittedAndSupportedFeature(PermittedAndSupportedFeatures.PermittedAndSupportedFeature feature,
boolean isEnabled)
Sets the supported feature.
|
void |
setPositionName(java.lang.String position)
Set the position name.
|
void |
setQueuedState(Enum.States queuedState)
Sets the queued banner's
state, necessary for corner ad |
void |
setSensitiveTargetingParamEnabled(boolean enabled)
Enables/disables targeting parameters which contain semi-sensitive data.
|
void |
setSiteId(java.lang.String siteId)
Set the site ID
|
void |
setSSLEnabled(boolean isEnabled)
Sets secure protocol(TLS/SSL) state of this ADvantage instance.
|
void |
setVerticalScrollingThreshold(int threshold)
Sets the vertical scrolling threshold.
|
void |
setVisibility(int visibility) |
void |
setVisibilityCheckInterval(int visibilityCheckInterval) |
void |
setVolumeObserverEnabled(boolean volumeObserverEnabled)
Set the enabled state of the volume change observer and register/unregister a proper
change observer!
|
void |
showAd()
Display the normal banner.
|
void |
showAd(Plugin plugin,
java.lang.String socialTarget)
Display the normal banner.
|
void |
showAd(java.lang.String socialTarget)
Display the normal banner.
|
void |
showInterstitial()
Display the interstitial (splash screen) banner.
|
void |
showInterstitial(Plugin plugin,
java.lang.String socialTarget)
Display the interstitial (splash screen) banner.
|
void |
showInterstitial(java.lang.String socialTarget)
Display the interstitial (splash screen) banner.
|
void |
showOfflineAd(java.lang.String url)
As a fallback, you can load your off-line content into the Advantage instance.
|
generateLayoutParams, getAccessibilityClassName, getBaseline, getGravity, getIgnoreGravity, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedStateaddChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, 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, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, 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, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, 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, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, 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, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDrawequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindowspublic Advantage(android.content.Context context,
android.util.AttributeSet attrs)
Create a new instance of Advantage. The license Key,site ID and position name need to define after creating this object.
context - Contextattrs - AttributeSetpublic Advantage(android.app.Activity activity,
java.lang.String licenseKey,
java.lang.String siteId,
java.lang.String position)
Create a new instance of Advantage.
activity - ActivitylicenseKey - This is a valid key which is unique for each application and platform issued by ADvantage sales team.siteId - Represents the current siteID. A list of the sites with a banner on it should be transmitted to
the AD-provider, so that the provider is able to create the site on their system.position - Is linked to the advertisement and allocates the corresponding space on the screen.
When positioning the banner you have to bear the size of the banner in mind.public static java.lang.String getVersion()
public void loadData(java.lang.String data,
java.lang.String mimeType,
java.lang.String encoding)
As a fallback, you can load your offline content into the Advantage instance.
data - a String of data in the given encodingmimeType - the MIME type of the data, e.g. 'text/html'encoding - the encoding of the datapublic void setActivityState(Advantage.ActivityState state)
Sets the current activity state. This method helps Advantage to manage life-cycle of the banner.
state - Advantage.ActivityStatepublic boolean registerCustomProtocol(java.util.List<java.lang.String> protocols,
Advantage.OnCustomUrlListener onCustomUrlListener)
Give the publisher application a chance to take over the control when a new URL with custom protocol is about to be loaded in the current ADvantage WebView.
protocols - A list of custom protocol(s).onCustomUrlListener - The custom protocol URL listener.true if the the listener is registered properly for the given protocol list,
otherwise return false.public void removeAllCookies()
This method is asynchronous.
public void setDataProtectionRights(DataProtectionRight dpr)
public void setDebugEnabled(boolean enabled)
Set the debugging state of this view.
enabled - true if debugging mode is activated.
false otherwise.public void setAspectRatio(boolean enabled)
Set the aspect ration state of this view. Per default the ADvantage object doesn't handle the aspect ratio automatically. But you can enable this feature.
enabled - true if keep aspect ratio is enabled.
false otherwise.public void setAdWebViewBackgroundColor(int color)
Sets the background color for the Advantage instance.
color - the color of the backgroundpublic void setMaxDimension(Size size)
size - For describing width and height dimensions in pixels.public boolean getSSLEnabled()
true if secure protocol is enabled.
false otherwise.public void setSSLEnabled(boolean isEnabled)
isEnabled - true if communication should be done over secure protocol.
false otherwise.public void setEventHandler(EventHandler eventHandler)
Adds banner's event handler to detect updates and failures.
eventHandler - An instance of EventHandlerpublic void removeEventHandler()
Removes the banner's predefined event handler.
public boolean isSensitiveTargetingParamEnabled()
true use the targeting parameters which contain sensitive data
(i.e. device network type), otherwise falsepublic void setSensitiveTargetingParamEnabled(boolean enabled)
Enables/disables targeting parameters which contain semi-sensitive data.
enabled - true use the targeting parameters which contain sensitive data
(i.e. device network type), otherwise falsepublic void setFallbackAdaptor(AdvantageFallbackAdaptor fallbackAdaptor)
public int getVisibilityCheckInterval()
public void setVisibilityCheckInterval(int visibilityCheckInterval)
public java.lang.String getLicenseKey()
This method always returns immediately, whether or not the license key exists.
public void setLicenseKey(java.lang.String licenseKey)
Set the user's license key
licenseKey - This is a key which is unique for each application and platform.
issued by ADvantage sales team.public java.lang.String getSiteId()
This method always returns immediately, whether or not the site identifier exists.
public void setSiteId(java.lang.String siteId)
Set the site ID
siteId - Represents the current siteID. A list of the sites with a banner on it should
be transmitted to the AD-provider, so that the provider is able to create the site on their system.public void setAllowAdWebViewToHandleScrollEvent(boolean enabled,
int threshold)
Set the touch listener's state of this view.
enabled - false if Advantage instance does not want the parent(Scrollable view)
and its ancestors to intercept touch events and it will force the ADvantage object to pass the touch
events onto its parents.
true otherwise. Default value is true.threshold - is defined for vertical scrolling which enable the clients to scroll the ListView/ScollView
vertically while they are touching the ADvantage objects (If the vertical scroll distance is more than predefined
distance threshold). The default value of the distance threshold is 100px.public boolean getAllowAdWebViewToHandleScrollEvent()
This method always returns immediately the touch listener's state of this view.
false if Advantage instance does not want the parent(Scrollable view)
and its ancestors to intercept touch events and it will force the ADvantage object to pass the touch
events onto its parents.
true otherwise.public void setAllowAdWebViewToHandleScrollEvent(boolean enabled)
Set the touch listener's state of this view.
enabled - false if Advantage instance does not want the parent(Scrollable view)
and its ancestors to intercept touch events and it will force the ADvantage object to pass the touch
events onto its parents.
true otherwise. Default value is true.public int getVerticalScrollingThreshold()
public void setVerticalScrollingThreshold(int threshold)
Sets the vertical scrolling threshold.
threshold - is defined for vertical scrolling which enable the clients to scroll the ListView/ScollView
vertically while they are touching the ADvantage objects (If the vertical scroll distance is more than predefined
distance threshold). The default value of the distance threshold is 100px.public java.lang.String getPositionName()
This method always returns immediately the banner's position name.
public void setPositionName(java.lang.String position)
Set the position name.
position - Represents the current position name. It Is linked to the advertisement and allocates
the corresponding space on the screen.
When positioning the banner you have to bear the size of the banner in mind.
public void addAdserverParameter(java.lang.String key,
java.lang.String value)
To target advertisement for specific user groups (i.e. age, sex,...) it is possible to transmit additional parameters to the AD-server. This method has to be called before requesting the ad, since for a working targeting it is required to send the AD-provider a list of the name-value-pairs.
key - Targeting parameter's name (key)value - Value of targeting parameterpublic boolean removeAdserverParameter(java.lang.String key)
This method allows you to remove a specific targeting parameter from ad server targeting parameter's list.
key - Targeting parameter's name (key)true if ad-server's parameter with the specified key removed successfully.
false otherwise.public void setCloseIndicator(int resourceId)
Sets the close button's image. The resource should refer to a Drawable object.
resourceId - The identifier of the resource.public Enum.States getQueuedState()
This method returns queued state of the banner, necessary for corner ad
state of banner.public void setQueuedState(Enum.States queuedState)
Sets the queued banner's state, necessary for corner ad
queuedState - Current statepublic void setDefaultBackgroundViewGroup(android.view.ViewGroup defaultBackgroundViewGroup)
Sets the background view of this banner.
defaultBackgroundViewGroup - An instance of ViewGrouppublic void setLoadingAnimationImageViewResourceId(int loadingAnimationImageViewResourceId)
Set the animation background to a given resource. The resource should refer to a Drawable object or 0 to remove the animation.
loadingAnimationImageViewResourceId - The identifier of the resource.public void setPermittedAndSupportedFeature(PermittedAndSupportedFeatures.PermittedAndSupportedFeature feature, boolean isEnabled)
Sets the supported feature.
feature - An instance of PermittedAndSupportedFeatures.PermittedAndSupportedFeature.isEnabled - true if the given feature is supported.
false otherwise.public void setOnSocialAdListener(Advantage.OnSocialAdListener onSocialAdListener)
Give the publisher application a chance to listen to the new Social link targets.
onSocialAdListener - The social ad target listener.public boolean isVolumeObserverEnabled()
public void setVolumeObserverEnabled(boolean volumeObserverEnabled)
volumeObserverEnabled - True if the volume observer is enabled, false otherwise.public int getCornerAdHorizontalMargin()
public void setCornerAdHorizontalMargin(int size)
size - of the horizontal margin in density pixels (dp)public int getCornerAdVerticalMargin()
public void setCornerAdVerticalMargin(int size)
size - of the vertical margin in density pixels (dp)public void showAd()
setSiteId(String), setPositionName(String), setLicenseKey(String)public void showAd(java.lang.String socialTarget)
setSiteId(String), setPositionName(String), setLicenseKey(String)socialTarget - The social Ad target.setOnSocialAdListener(Advantage.OnSocialAdListener)public void showAd(Plugin plugin, java.lang.String socialTarget)
setSiteId(String), setPositionName(String), setLicenseKey(String)plugin - An instance of external plug-in.socialTarget - The social Ad target, if any!public void showInterstitial()
setSiteId(String), setPositionName(String), setLicenseKey(String)public void showInterstitial(java.lang.String socialTarget)
setSiteId(String), setPositionName(String), setLicenseKey(String)socialTarget - The social Ad target.public void showInterstitial(Plugin plugin, java.lang.String socialTarget)
setSiteId(String), setPositionName(String), setLicenseKey(String)plugin - An instance of external plug-in.socialTarget - The social Ad target, if any!public void showOfflineAd(java.lang.String url)
As a fallback, you can load your off-line content into the Advantage instance. In this case Advantage features will be disabled.
url - the URL of the resource to load.public void setVisibility(int visibility)
setVisibility in class android.view.Viewpublic void setLayoutParams(android.view.ViewGroup.LayoutParams params)
setLayoutParams in class android.view.Viewpublic void setLayoutTransition(android.animation.LayoutTransition transition)
setLayoutTransition in class android.view.ViewGrouppublic void dispose()
Dispose the current instance of advantage and destroys the internal state of this Advantage instance.
public void onLicenseReceived(com.digitalsunray.advantage.License license,
Plugin plugin)
public void onAdvertisingInfoFetched(@Nullable
com.google.android.gms.ads.identifier.AdvertisingIdClient.Info info)
public void onScrollChanged()
onScrollChanged in interface android.view.ViewTreeObserver.OnScrollChangedListener