@MainThread
public class POBMraidBridge
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected com.pubmatic.sdk.common.view.POBWebView |
webView |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommandHandler(com.pubmatic.sdk.webrendering.mraid.POBMRAIDCommandHandling commandHandling) |
void |
error(java.lang.String str)
Native method to handle the error coming from MRAID ad
|
protected com.pubmatic.sdk.webrendering.mraid.MraidStates |
getMraidState()
Getter method to get mraid state
|
void |
log(java.lang.String str)
Native method to handle the logs coming from MRAID ad
|
void |
nativeCall(java.lang.String commandScheme)
Native method to handle the events/commands coming from MRAID ad
|
protected void |
notifyError(java.lang.String errorMessage,
java.lang.String action)
Method is used to inform error to mraid.js
|
protected void |
resetPropertyMap()
Reset map properties
|
protected void |
setAudioVolumePercentage(java.lang.Double volumePercentage)
Method to update Device audio percentage to mraid
|
protected boolean |
setCurrentPosition(int x,
int y,
int width,
int height)
Method to update Current position of container to mraid
also check whether current position values are updated from previous or not
if updated then only update to mraid js
|
protected void |
setDefaultPosition(int x,
int y,
int width,
int height)
Method to update default position of container to mraid
|
protected void |
setLocation(com.pubmatic.sdk.common.models.POBLocation location)
Method is used to update location of device to mraid js
|
protected boolean |
setMaxSize(int maxWidth,
int maxHeight)
Method to set maxWidth, maxHeight of container to mraid
also check update is already happened with same values if not then updates
|
protected void |
setMraidBridgeListener(com.pubmatic.sdk.webrendering.mraid.POBMraidBridgeListener mraidBridgeListener) |
protected void |
setMraidState(com.pubmatic.sdk.webrendering.mraid.MraidStates mraidState)
Setter method to set mraid state
|
protected void |
setPlacementType(java.lang.String placementType)
Method to update placement type of creative to mraid
|
protected void |
setScreenSize(int screenWidth,
int screenHeight)
Method to update screenWidth and screenHeight of device to mraid
|
protected void |
setSizeChange(int width,
int height)
Method is used to update sizechange event with height, width to mraid.js
|
protected void |
setSupportedFeatures(boolean sms,
boolean tel,
boolean calendar,
boolean storePicture,
boolean inlineVideo,
boolean location,
boolean vpaid)
Method to update supported properties to mraid js
|
protected void |
updateEvent(com.pubmatic.sdk.webrendering.mraid.MraidEvents event)
Method is used to inform event to mraid.js
|
protected void |
updateExposureChangeData(java.lang.Float visiblePercentage,
org.json.JSONObject visibleRectangle)
Update exposure change data of creative to mraid.js
|
protected void |
updateMraidState(com.pubmatic.sdk.webrendering.mraid.MraidStates mraidState)
Method to used state of mraid.js
|
protected void |
updateViewable(boolean viewabilityState)
Method to update POBOpenMeasurement status of ad container to mraid.js
|
@AnyThread
public void nativeCall(@Nullable
java.lang.String commandScheme)
commandScheme - command namepublic void error(java.lang.String str)
str - error descriptionpublic void log(java.lang.String str)
str - log message from JSprotected void setMraidBridgeListener(@Nullable
com.pubmatic.sdk.webrendering.mraid.POBMraidBridgeListener mraidBridgeListener)
protected void addCommandHandler(@NonNull
com.pubmatic.sdk.webrendering.mraid.POBMRAIDCommandHandling commandHandling)
protected void notifyError(@Nullable
java.lang.String errorMessage,
@Nullable
java.lang.String action)
errorMessage - content of erroraction - for which the error occuredprotected void updateEvent(@NonNull
com.pubmatic.sdk.webrendering.mraid.MraidEvents event)
event - tell the mraid.js about the current eventprotected void setSizeChange(int width,
int height)
width - of containerheight - of containerprotected void updateMraidState(@NonNull
com.pubmatic.sdk.webrendering.mraid.MraidStates mraidState)
mraidState - state of mraidprotected void updateViewable(boolean viewabilityState)
viewabilityState - flagprotected void updateExposureChangeData(java.lang.Float visiblePercentage,
org.json.JSONObject visibleRectangle)
visiblePercentage - visibility of add in percentagevisibleRectangle - visibility of ad rectangle@NonNull protected com.pubmatic.sdk.webrendering.mraid.MraidStates getMraidState()
protected void setMraidState(@NonNull
com.pubmatic.sdk.webrendering.mraid.MraidStates mraidState)
mraidState - state of mraidprotected void setSupportedFeatures(boolean sms,
boolean tel,
boolean calendar,
boolean storePicture,
boolean inlineVideo,
boolean location,
boolean vpaid)
sms - boolean flagtel - boolean flagcalendar - boolean flagstorePicture - boolean flaginlineVideo - boolean flaglocation - boolean flagprotected void setPlacementType(@NonNull
java.lang.String placementType)
placementType - value of type stringprotected boolean setCurrentPosition(int x,
int y,
int width,
int height)
x - position of containery - position of containerwidth - of containerheight - of containerprotected void setDefaultPosition(int x,
int y,
int width,
int height)
x - position of containery - position of containerwidth - containerheight - containerprotected void setScreenSize(int screenWidth,
int screenHeight)
screenWidth - of devicescreenHeight - of deviceprotected void setLocation(com.pubmatic.sdk.common.models.POBLocation location)
location - of type POBLocationprotected boolean setMaxSize(int maxWidth,
int maxHeight)
maxWidth - of containermaxHeight - of containerprotected void setAudioVolumePercentage(@Nullable
java.lang.Double volumePercentage)
volumePercentage - of deviceprotected void resetPropertyMap()