Class BaseJSInterface
java.lang.Object
org.prebid.mobile.rendering.views.webview.mraid.BaseJSInterface
- All Implemented Interfaces:
JSInterface
- Direct Known Subclasses:
BannerJSInterface,InterstitialJSInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WebViewBaseprotected android.content.Contextprotected PrebidWebViewBaseFields inherited from interface org.prebid.mobile.rendering.views.webview.mraid.JSInterface
ACTION_CLOSE, ACTION_CREATE_CALENDAR_EVENT, ACTION_EXPAND, ACTION_GET_CURRENT_POSITION, ACTION_GET_DEFAULT_POSITION, ACTION_GET_MAX_SIZE, ACTION_GET_PLACEMENT_TYPE, ACTION_GET_SCREEN_SIZE, ACTION_OPEN, ACTION_ORIENTATION_CHANGE, ACTION_PLAY_VIDEO, ACTION_RESIZE, ACTION_STORE_PICTURE, ACTION_UNLOAD, DEVICE_ORIENTATION, DEVICE_ORIENTATION_LOCKED, JSON_HEIGHT, JSON_IS_MODAL, JSON_METHOD, JSON_VALUE, JSON_WIDTH, JSON_X, JSON_Y, LOCATION_ACCURACY, LOCATION_ERROR, LOCATION_LASTFIX, LOCATION_LAT, LOCATION_LON, LOCATION_TYPE, STATE_DEFAULT, STATE_EXPANDED, STATE_HIDDEN, STATE_LOADING, STATE_RESIZED -
Constructor Summary
ConstructorsConstructorDescriptionBaseJSInterface(android.content.Context context, WebViewBase adBaseView, JsExecutor jsExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcreateCalendarEvent(String parameters) voiddestroy()voidexpand()voidvoidfollowToOriginalUrl(String url, RedirectUrlListener listener) android.view.ViewGroup.LayoutParamsandroid.view.ViewGroupvoidhandleScreenViewabilityChange(boolean isViewable) voidjavaScriptCallback(String handlerHash, String method, String value) voidloading()protected voidvoidvoidonOrientationPropertiesChanged(String properties) voidvoidonStateChange(String state) voidvoidvoidvoidresize()voidsetDefaultLayoutParams(android.view.ViewGroup.LayoutParams originalParentLayoutParams) voidshouldUseCustomClose(String useCustomClose) Deprecated.voidstorePicture(String url) booleanvoidunload()voidupdateScreenMetricsAsync(Runnable successRunnable) Updates screen metrics, calling the successRunnable once they are available.
-
Field Details
-
context
protected android.content.Context context -
adBaseView
-
defaultAdContainer
-
-
Constructor Details
-
BaseJSInterface
public BaseJSInterface(android.content.Context context, WebViewBase adBaseView, JsExecutor jsExecutor)
-
-
Method Details
-
getMaxSize
- Specified by:
getMaxSizein interfaceJSInterface
-
getScreenSize
- Specified by:
getScreenSizein interfaceJSInterface
-
getDefaultPosition
- Specified by:
getDefaultPositionin interfaceJSInterface
-
getCurrentPosition
- Specified by:
getCurrentPositionin interfaceJSInterface
-
onOrientationPropertiesChanged
- Specified by:
onOrientationPropertiesChangedin interfaceJSInterface
-
getPlacementType
- Specified by:
getPlacementTypein interfaceJSInterface
-
close
public void close()- Specified by:
closein interfaceJSInterface
-
resize
public void resize()- Specified by:
resizein interfaceJSInterface
-
expand
public void expand()- Specified by:
expandin interfaceJSInterface
-
expand
- Specified by:
expandin interfaceJSInterface
-
open
- Specified by:
openin interfaceJSInterface
-
javaScriptCallback
- Specified by:
javaScriptCallbackin interfaceJSInterface
-
createCalendarEvent
- Specified by:
createCalendarEventin interfaceJSInterface
-
storePicture
- Specified by:
storePicturein interfaceJSInterface
-
supports
- Specified by:
supportsin interfaceJSInterface
-
playVideo
- Specified by:
playVideoin interfaceJSInterface
-
shouldUseCustomClose
Deprecated.- Specified by:
shouldUseCustomClosein interfaceJSInterface
-
getLocation
- Specified by:
getLocationin interfaceJSInterface
-
getCurrentAppOrientation
- Specified by:
getCurrentAppOrientationin interfaceJSInterface
-
unload
public void unload()- Specified by:
unloadin interfaceJSInterface
-
onStateChange
-
handleScreenViewabilityChange
public void handleScreenViewabilityChange(boolean isViewable) -
getMraidVariableContainer
-
getScreenMetrics
-
getDefaultAdContainer
-
onError
-
followToOriginalUrl
-
setDefaultLayoutParams
public void setDefaultLayoutParams(android.view.ViewGroup.LayoutParams originalParentLayoutParams) -
getDefaultLayoutParams
public android.view.ViewGroup.LayoutParams getDefaultLayoutParams() -
getRootView
public android.view.ViewGroup getRootView() -
getJsExecutor
-
loading
public void loading() -
onReadyExpanded
public void onReadyExpanded() -
prepareAndSendReady
public void prepareAndSendReady() -
updateScreenMetricsAsync
Updates screen metrics, calling the successRunnable once they are available. The successRunnable will always be called asynchronously, ie on the next main thread loop. -
destroy
public void destroy() -
notifyScreenMetricsChanged
protected void notifyScreenMetricsChanged()
-