XMediator::Api::Rewarded
Inherits from IDisposable
Public Events
Name | |
---|---|
Action< PrebiddingResults > | OnPrebiddingFinished() Notifies when the prebidding call finished, containing a PrebiddingResults object. |
Action< LoadResult > | OnLoaded() Notifies when the rewarded was loaded successfully, containing a LoadResult object. |
Action< LoadError, LoadResult > | OnFailedToLoad() Notifies when the rewarded failed to load, containing a LoadError object describing the error and optionally a LoadResult object. |
Action< ShowError > | OnFailedToShow() Notifies when the rewarded failed to show, containing a ShowError object describing the error. |
Action | OnShowed() Notifies when the rewarded was shown. |
Action< ImpressionData > | OnImpression() Notifies when the rewarded impression was recorded, containing an ImpressionData object. |
Action | OnClicked() Notifies when the rewarded was clicked. |
Action | OnDismissed() Notifies when the rewarded was dismissed. |
Action | OnEarnedReward() Notifies when the user should be granted a reward for watching the ad. This callback won't be called if the user skipped the ad. |
Public Functions
Name | |
---|---|
Rewarded | Create(string placementId, bool test =false, bool verbose =false) Creates a new instance of a Rewarded. |
void | Load(CustomProperties customProperties =null) Starts a new load call. |
bool | IsReady() Indicates if the rewarded is ready to show. |
void | Show() Shows a previously loaded rewarded. |
void | Show(string adSpace) Shows a previously loaded rewarded. |
void | Dispose() Disposes this interstitial object and can no longer be used for loading or showing. |
Public Events Documentation
event OnPrebiddingFinished
Notifies when the prebidding call finished, containing a PrebiddingResults object.
event OnLoaded
Notifies when the rewarded was loaded successfully, containing a LoadResult object.
event OnFailedToLoad
Notifies when the rewarded failed to load, containing a LoadError object describing the error and optionally a LoadResult object.
event OnFailedToShow
Notifies when the rewarded failed to show, containing a ShowError object describing the error.
event OnShowed
Notifies when the rewarded was shown.
event OnImpression
Notifies when the rewarded impression was recorded, containing an ImpressionData object.
event OnClicked
Notifies when the rewarded was clicked.
event OnDismissed
Notifies when the rewarded was dismissed.
event OnEarnedReward
Notifies when the user should be granted a reward for watching the ad. This callback won't be called if the user skipped the ad.
Public Functions Documentation
function Create
Creates a new instance of a Rewarded.
Parameters:
- placementId A string containing a valid placement id.
- test Whether a test rewarded should be loaded. This is only for testing purposes, should be false on production builds.
- verbose Enable logging for this rewarded instance. This is only for debugging purposes, should be false on production builds.
Return: A Rewarded instance ready to load.
function Load
Starts a new load call.
Parameters:
- customProperties A CustomProperties object containing custom properties, useful for tracking.
function IsReady
Indicates if the rewarded is ready to show.
Return: true
if the rewarded is ready to show, false
otherwise.
function Show
Shows a previously loaded rewarded.
function Show
Shows a previously loaded rewarded.
Parameters:
- adSpace The space in your app from where the ad will be shown (eg: dashboard, settings). Used for tracking.
function Dispose
Disposes this interstitial object and can no longer be used for loading or showing.
Updated on 2024-11-07 at 18:31:49 +0000