Skip to content

Interstitial

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

Interstitial

This module contains functions for 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_Interstitial_Init

⛔ This function was deprecated with version 1.3.0.

This function initialises the target identifier for interstitial ad functions.

Note

Please refer to AdMob_Interstitial_Set_AdUnit for more information.


Syntax:

AdMob_Interstitial_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_Interstitial_Set_AdUnit

This function sets the target identifier for interstitial functions, interstitials allow multiple identifiers.


Syntax:

AdMob_Interstitial_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_Interstitial_Free_Load_Instances

This function releases interstitial load instances (passing -1 will free all the loaded instances).


Syntax:

Admob_Interstitial_Free_Load_Instances(count)
Argument Type Description
count Real The number of interstitial ad instances to free



Returns:

N/A


Versioning:

  • 1.3.0 - This function was introduced.



Back To Top

Admob_Interstitial_Max_Instances

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


Syntax:

Admob_Interstitial_Max_Instances(count)
Argument Type Description
count Real The maximum number of interstitial ads that can be loaded at the same time



Returns:

N/A


Versioning:

  • 1.3.0 - This function was introduced.



Back To Top

AdMob_Interstitial_Load

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

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

Note

You can check whether an interstitial is loaded or not using the function AdMob_Interstitial_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_Interstitial_Load()



Returns:

AdMobErrors


Triggers:

Social Async Event

This event is triggered if the awaited task succeeds.

Key Type Description
type AdMobEvent The constant ADMOB_EV_INTERSTITIAL_LOADED
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_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



Back To Top

AdMob_Interstitial_Show

This function will show the next interstitial ad, if one is available and loaded. You can check whether an ad is available using the function AdMob_Interstitial_IsLoaded.

Note

While an interstitial 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_Interstitial_Show()



Returns:

AdMobErrors


Triggers:

Social Async Event

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

Key Type Description
type AdMobEvent The constant ADMOB_EV_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_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_INTERSTITIAL_SHOWED
unit_id String Unit identifier of the advertisement



Back To Top

AdMob_Interstitial_IsLoaded

This function returns whether an interstitial ad is loaded.


Syntax:

AdMob_Interstitial_IsLoaded()



Returns:

Boolean




Back To Top

AdMob_Interstitial_Instances_Count

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


Syntax:

AdMob_Interstitial_Instances_Count()



Returns:

Real


Versioning:

  • 1.3.0 - This function was introduced.


Clone this wiki locally