Skip to content
YYBartT edited this page Dec 8, 2022 · 9 revisions

Banner Functions

AdMob_Banner_Init

This is a required initialization if you want to use banner ads. Allows to set up the unique string id for banner ads.

Syntax:

AdMob_Banner_Init(banner_id)
Argument Type Description
banner_id String The unique id of the banner ad block.

Returns:

N/A

AdMob_Banner_Create [UPDATED]

Syntax:

AdMob_Banner_Create(banner_type, true)
Argument Type Description
banner_type Banner Type The type of the banner to be displayed.
bottom Boolean Whether the banner should be placed at the bottom of the display.

Returns:

N/A

Triggers:

Social Async Event

<if succeeds>

type: "AdMob_Banner_OnLoaded"

<if fails>

type: "AdMob_Banner_OnLoadFailed"
errorCode {int}: the error code responsible for the failure
errorMessage {string}: the error message of the error code

Replaces:

GoogleMobileAds_AddBanner(bannerAdId, sizeType)

AdMob_Banner_Move

This function can be used to move 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:

N/A

Notes:

No positional (x, y) information can be set.

Replaces:

GoogleMobileAds_MoveBanner(display_x, display_y)

AdMob_Banner_Remove

This function will remove 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:

N/A

Replaces:

GoogleMobileAds_RemoveBanner()

AdMob_Banner_Show

This function can be used to show 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:

N/A

Replaces:

GoogleMobileAds_ShowBanner()

AdMob_Banner_Hide

This function can be used to hide 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()

Replaces:

GoogleMobileAds_HideBanner()

AdMob_Banner_GetWidth

This function can be used to get the width of the currently loaded banner ad block. The value returned is in pixels.

Syntax:

AdMob_Banner_GetWidth()

Notes:

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.

Returns:

{real} The width of the ad.

Replaces:

GoogleMobileAds_BannerGetWidth()

AdMob_Banner_GetHeight

This function can be used to get the height of the currently loaded banner ad block. The value returned is in pixels.

Syntax:

AdMob_Banner_GetHeight()

Notes:

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.

Returns:

{real} The height of the ad.
Clone this wiki locally