public abstract class AdSession
extends java.lang.Object
| Constructor and Description |
|---|
AdSession() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addFriendlyObstruction(android.view.View friendlyObstruction)
Add friendly obstruction which should then be excluded from all ad session viewability
calculations.
|
static AdSession |
createAdSession(AdSessionConfiguration adSessionConfiguration,
AdSessionContext adSessionContext)
Create new ad session supplying the adSessionConfiguration and adSessionContext.
|
abstract void |
error(ErrorType errorType,
java.lang.String message)
Notify all verification providers that an error has occurred on the ad session.
|
abstract void |
finish()
Notify all verification providers that the ad session has finished and all ad view tracking
will stop.
|
abstract java.lang.String |
getAdSessionId() |
abstract com.iab.omid.library.publisher.AdSessionStatePublisher |
getAdSessionStatePublisher()
Use of getAdSessionStatePublisher() and getAdSessionId() is highly discouraged.
|
abstract void |
registerAdView(android.view.View adView)
Register ad view to be used for tracking viewability.
|
abstract void |
removeAllFriendlyObstructions()
Utility method to remove all registered friendly obstructions.
|
abstract void |
removeFriendlyObstruction(android.view.View friendlyObstruction)
Remove registered friendly obstruction.
|
abstract void |
start()
Notify all verification providers that the ad session has started and ad view tracking will
begin.
|
public abstract void start()
public abstract void error(ErrorType errorType, java.lang.String message)
errorType - of the reported errormessage - containing details of the reported errorjava.lang.IllegalArgumentException - if the supplied error type is null.java.lang.IllegalArgumentException - if the supplied message is either null or blank.java.lang.IllegalStateException - if the ad session has finished.public abstract void registerAdView(android.view.View adView)
adView - the native view which should be registered for viewability tracking.java.lang.IllegalArgumentException - if the supplied ad view is null.public abstract void finish()
public abstract void addFriendlyObstruction(android.view.View friendlyObstruction)
friendlyObstruction - to be excluded from all ad session viewability calculations.java.lang.IllegalArgumentException - if the supplied friendly obstruction is null.public abstract void removeFriendlyObstruction(android.view.View friendlyObstruction)
friendlyObstruction - to be removed from the list of registered friendly obstructions.java.lang.IllegalArgumentException - if the supplied friendly obstruction is null.public abstract void removeAllFriendlyObstructions()
public abstract com.iab.omid.library.publisher.AdSessionStatePublisher getAdSessionStatePublisher()
public abstract java.lang.String getAdSessionId()
public static AdSession createAdSession(AdSessionConfiguration adSessionConfiguration, AdSessionContext adSessionContext)
adSessionContext - that provides the required information for initialising the ad session.java.lang.IllegalArgumentException - if the supplied adSessionContext is null.java.lang.IllegalStateException - if this method has been executed before OMID has been
activated.