Skip to content
Francisco Dias edited this page Nov 19, 2024 · 9 revisions

Banner

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

⛔ This function was deprecated with version 1.3.0.

This function initialises the target identifier for banner functions.

Note

Please refer to AdMob_Banner_Set_AdUnit for more information.


Syntax:

AdMob_Banner_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_Banner_Set_AdUnit

This function sets the target identifier for banner functions, Banner functions don't allow multiple preloaded identifiers.


Syntax:

AdMob_Banner_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_Banner_Create

This function creates a banner ad.

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_Banner_Create(size, bottom)
Argument Type Description
size Real The type of the banner to be displayed.
bottom Boolean Whether the banner should be placed at the bottom of the display.



Returns:

AdMobErrors


Triggers:

Social Async Event

This event is triggered if the awaited task succeeds.

Key Type Description
type AdMobEvent The constant ADMOB_EV_BANNER_LOADED

This event is triggered if the awaited task fails.

Key Type Description
type AdMobEvent The constant ADMOB_EV_BANNER_LOAD_FAILED
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code



Back To Top

AdMob_Banner_Create_Ext

This function creates a banner ad with extended alignment options.

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_Banner_Create_Ext(size, bottom, alignment)
Argument Type Description
size Real The type of the banner to be displayed.
bottom Boolean Whether the banner should be placed at the bottom of the display.
alignment AdMobBannerAlignment The horizontal alignment to be used by the banner.



Returns:

AdMobErrors


Triggers:

Social Async Event

This event is triggered if the awaited task succeeds.

Key Type Description
type AdMobEvent The constant ADMOB_EV_BANNER_LOADED

This event is triggered if the awaited task fails.

Key Type Description
type AdMobEvent The constant ADMOB_EV_BANNER_LOAD_FAILED
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code

Versioning:

  • 1.4.0 - This function was introduced.



Back To Top

AdMob_Banner_GetWidth

This function gets the width of the currently loaded banner ad block. The value returned is in pixels.

Note

This function returns the width in screen pixels, it’s up to the developer to convert the value to the correct scale according to the render target being used.


Syntax:

AdMob_Banner_GetWidth()



Returns:

Real




Back To Top

AdMob_Banner_GetHeight

This function gets the height of the currently loaded banner ad block. The value returned is in pixels.

Note

This function returns the height in screen pixels, it’s up to the developer to convert the value to the correct scale according to the render target being used.


Syntax:

AdMob_Banner_GetHeight()



Returns:

Real




Back To Top

AdMob_Banner_Move

This function moves a banner that has been previously added. You supply a boolean that will determine if the banner should be placed at the bottom or at the top of the display.


Syntax:

AdMob_Banner_Move(bottom)
Argument Type Description
bottom Boolean Whether the banner should be placed at the bottom of the display.



Returns:

AdMobErrors




Back To Top

AdMob_Banner_Show

This function shows the currently active, but hidden, banner ad block. When called, the banner will be shown to the user again and will be able to receive input.

You can hide the banner again at any time using the AdMob_Banner_Hide function.


Syntax:

AdMob_Banner_Show()



Returns:

AdMobErrors




Back To Top

AdMob_Banner_Hide

This function hides the currently active banner ad block. When called, the banner will be removed from the user’s view and will no longer receive input.

You can show the banner again at any time using the AdMob_Banner_Show function.


Syntax:

AdMob_Banner_Hide()



Returns:

AdMobErrors




Back To Top

AdMob_Banner_Remove

This function removes the currently active banner from the app. If you call this function then want to show ads again, you must call the AdMob_Banner_Create function first to add a new banner to the display.


Syntax:

AdMob_Banner_Remove()



Returns:

AdMobErrors



Clone this wiki locally