@MainThread public class POBMraidController extends java.lang.Object implements POBAdVisibilityListener
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the expanded / resized ad.
|
void |
createCalendarEvent(org.json.JSONObject calendarEvent,
boolean userInteracted)
Creates the calendar event using default calendar app.
|
void |
destroy()
Performs the resource cleanup
|
void |
expand(java.lang.String uri,
boolean userInteracted)
Expands the MRAID ad as a full screen
|
boolean |
isUserInteracted(boolean overrideClickState)
Returns true if user has recently touch/click on MRAID web view.
|
void |
listenerChanged(java.lang.String key,
boolean hasListener)
Handles the state of the listener based on provide key and state
|
void |
onVisibilityChange(boolean visibility)
Notifies about the ad visibility state
|
void |
open(java.lang.String url,
boolean userInteracted)
Opens the url as a landing page in internal/external browser.
|
void |
playVideo(java.lang.String url,
boolean userInteracted)
Play video inside native player using given media url
|
void |
resize(int width,
int height,
int offsetX,
int offsetY,
boolean allowOffscreen,
boolean userInteracted)
Resize the creative view as per provided size
|
void |
setOrientation(boolean allowOrientationChange,
java.lang.String forceOrientation,
boolean userInteracted)
Set the orientation of the current activity
|
void |
storePicture(java.lang.String url,
boolean userInteracted)
Download and store the image with given URL
|
void |
unload()
Unloads the current MRAID creative and notify banner to make a call to new ad request
|
public void destroy()
public void open(java.lang.String url,
boolean userInteracted)
url - Landing page url.public void expand(@Nullable
java.lang.String uri,
boolean userInteracted)
uri - If url is passed then expand as a two-part else consider single part expand.public void close()
public void setOrientation(boolean allowOrientationChange,
java.lang.String forceOrientation,
boolean userInteracted)
allowOrientationChange - Check if orientation change is allowed or notforceOrientation - set the provided orientation to activitypublic void storePicture(java.lang.String url,
boolean userInteracted)
url - image url.public void createCalendarEvent(org.json.JSONObject calendarEvent,
boolean userInteracted)
calendarEvent - Calendar eventpublic void resize(int width,
int height,
int offsetX,
int offsetY,
boolean allowOffscreen,
boolean userInteracted)
width - New resized width of an adheight - New resized height of an adoffsetX - New x-offset of an adoffsetY - New y-offset of an adallowOffscreen - state to allow screen offpublic void playVideo(java.lang.String url,
boolean userInteracted)
url - media url to play videopublic boolean isUserInteracted(boolean overrideClickState)
public void unload()
public void listenerChanged(java.lang.String key,
boolean hasListener)
key - Name of the listenerhasListener - true if listener needs to be attached and false if needs to be detach/removepublic void onVisibilityChange(boolean visibility)
onVisibilityChange in interface POBAdVisibilityListenervisibility - true if visibility is Gained and false if visibility looses.