public interface EventHandler
This interface represents a banner's routed event handlers. Sometimes a developer might want to take a special action if no ad is available that satisfies the current constraints sent to the mobile ad server. This might occur if a particular ad type or minimum size was requested, and no matching ad is available. This could also happen if all ads scheduled for the requested zone have reach the maximum daily or monthly cap. Developers can also take advantage of a successful ad loaded to redisplay a hidden banner or to show interstitials after the ad is downloaded. The ADvantage SDK includes an optional EventHandler for all these events to take action:
| Modifier and Type | Method and Description |
|---|---|
void |
adClosed(Advantage advantage)
Occurs when the current ADvantage object is closed (disposed)
|
void |
adError(Advantage advantage,
java.lang.String errorMsg,
Enum.ErrorCategory errorCategory)
Occurs when an SDK major error occurs.
|
void |
adExpanded(Advantage advantage)
Occurs when the creative goes to the 'EXPAND' state.
|
void |
adLoaded(Advantage advantage,
Enum.LoadingStatus status)
Occurs when the ADvantage object is loaded and initialized.
|
void |
adNotify(java.lang.Object object)
Occurs when a message sends from Advantage object to the SDK implementer.
|
void |
adResized(Advantage advantage)
Occurs when the creative goes to the 'RESIZE' state.
|
void adError(Advantage advantage, java.lang.String errorMsg, Enum.ErrorCategory errorCategory)
Occurs when an SDK major error occurs. The event contains a description of the error that occurred.
advantage - Current ADvantage instance.errorMsg - Error message.errorCategory - Category of reported error.void adClosed(Advantage advantage)
Occurs when the current ADvantage object is closed (disposed)
advantage - Current ADvantage instance.void adLoaded(Advantage advantage, Enum.LoadingStatus status)
Occurs when the ADvantage object is loaded and initialized.
status - An instance of Enum.LoadingStatusadvantage - Current ADvantage instance.void adExpanded(Advantage advantage)
Occurs when the creative goes to the 'EXPAND' state.
advantage - Current ADvantage instance.void adResized(Advantage advantage)
Occurs when the creative goes to the 'RESIZE' state.
advantage - Current ADvantage instance.void adNotify(java.lang.Object object)
Occurs when a message sends from Advantage object to the SDK implementer. The event contains the value of the message.
object - Message from Advantage object.