Skip to content

reward_interstitial

Francisco Dias edited this page Nov 19, 2024 · 5 revisions

Rewarded Interstitial

This module contains functions for rewarded interstitial ads.

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

AdMob_RewardedInterstitial_Init

⛔ This function was deprecated with version 1.3.0.

This function initialises the target identifier for rewarded interstitial ad functions.

Note

Please refer to AdMob_RewardedInterstitial_Set_AdUnit for more information.


Syntax:

AdMob_RewardedInterstitial_Init(adUnitId)
Argument Type Description
adUnitId String The ad unit ID



Returns:

N/A


Versioning:

  • 1.3.0 - ⛔ This function was deprecated.



Back To Top

AdMob_RewardedInterstitial_Set_AdUnit

This function sets the target identifier for rewarded interstitial functions. Rewarded interstitial functions allow multiple identifiers.


Syntax:

AdMob_RewardedInterstitial_Set_AdUnit(adUnitId)
Argument Type Description
adUnitId String The ad unit ID



Returns:

N/A


Versioning:

  • 1.3.0 - This function was introduced.



Back To Top

AdMob_RewardedInterstitial_Free_Load_Instances

This function releases the requested number of Rewarded Interstitial load instances.


Syntax:

AdMob_RewardedInterstitial_Free_Load_Instances(count)
Argument Type Description
count Real The number of instances to release (-1 will free all the loaded instances)



Returns:

N/A


Versioning:

  • 1.3.0 - This function was introduced.



Back To Top

AdMob_RewardedInterstitial_Max_Instances

This function sets the maximum number of Rewarded Insterstitials load instances, this allows you to present consecutive ads. Default value is 1.


Syntax:

AdMob_RewardedInterstitial_Max_Instances(count)
Argument Type Description
count Real



Returns:

N/A


Versioning:

  • 1.3.0 - This function was introduced.



Back To Top

AdMob_RewardedInterstitial_Load

This function should be called when you want to load a rewarded interstitial ad. Calling it will send a request to the ad server to provide a rewarded ad, which will then be loaded into the app for display.

This function does not show the ad, just stores it in memory ready for showing. If you do not call this function before trying to show an ad, nothing will be shown.

Note

You can check whether a rewarded interstitial is loaded or not using the function AdMob_RewardedInterstitial_IsLoaded.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

AdMob_RewardedInterstitial_Load()



Returns:

AdMobErrors


Triggers:

Social Async Event

This event is triggered if the awaited task fails.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_LOAD_FAILED
unit_id String Unit identifier of the advertisement
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code

This event is triggered if the awaited task succeeds.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_LOADED
unit_id String Unit identifier of the advertisement



Back To Top

AdMob_RewardedInterstitial_Show

This function will show the next rewarded video ad, if one is available and loaded. You can check whether an ad has previously been loaded using the function AdMob_RewardedInterstitial_IsLoaded.

Note

While a rewarded interstitial ad is being shown, your app will be put into the background and will effectively be "paused".

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

AdMob_RewardedInterstitial_Show()



Returns:

AdMobErrors


Triggers:

Social Async Event

This event is triggered when the ad view is closed by the user.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_DISMISSED
unit_id String Unit identifier of the advertisement

This event is triggered if the awaited task fails.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_SHOW_FAILED
unit_id String Unit identifier of the advertisement
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code

This event is triggered if the awaited task succeeds.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_SHOWED
unit_id String Unit identifier of the advertisement

This event is triggered if the user should be rewarded.

Key Type Description
type AdMobEvent The constant ADMOB_EV_REWARDED_INTERSTITIAL_REWARD
unit_id String Unit identifier of the advertisement



Back To Top

AdMob_RewardedInterstitial_IsLoaded

This function returns whether a rewarded interstitial ad has been loaded or not.


Syntax:

AdMob_RewardedInterstitial_IsLoaded()



Returns:

Boolean




Back To Top

AdMob_RewardedInterstitial_Instances_Count

This function returns the number of Rewarded Interstitial load instances that are ready.


Syntax:

AdMob_RewardedInterstitial_Instances_Count()



Returns:

Real


Versioning:

  • 1.3.0 - This function was introduced.