-
Notifications
You must be signed in to change notification settings - Fork 3
app_open
This module contains functions for App Open Ads.
App open ads are a special ad format intended for publishers wishing to monetize their app load screens. App open ads can be closed at any time, and are designed to be shown when your users bring your app to the foreground.
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.
AdMob_AppOpenAd_Init⛔- AdMob_AppOpenAd_Set_AdUnit
- AdMob_AppOpenAd_Enable
- AdMob_AppOpenAd_Disable
- AdMob_AppOpenAd_IsEnabled
- AdMob_AppOpenAd_Load
- AdMob_AppOpenAd_Show
- AdMob_AppOpenAd_IsLoaded
⛔ This function was deprecated with version 1.3.0.
This function initialises the target identifier for app open ads functions.
Note
Please refer to AdMob_AppOpenAd_Set_AdUnit for more information.
Syntax:
AdMob_AppOpenAd_Init(adUnitId)
Argument | Type | Description |
---|---|---|
adUnitId | String | The ID of the ad unit |
Returns:
N/A
Versioning:
-
1.3.0
- ⛔ This function was deprecated.
This function sets the target identifier for app open ads functions. App open ad functions don't allow multiple pre-loaded identifiers.
Syntax:
AdMob_AppOpenAd_Set_AdUnit(adUnitId)
Argument | Type | Description |
---|---|---|
adUnitId | String | The ID of the ad unit |
Returns:
N/A
Versioning:
-
1.3.0
- This function was introduced.
This function enables show App Open Ads when the game resumes from background.
Note
This is part of the automatic management of the App Open Ad lifecycle, if you with to manually handle it you can turn it of and use the functions AdMob_AppOpenAd_Load and AdMob_AppOpenAd_Show.
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_AppOpenAd_Enable(orientation)
Argument | Type | Description |
---|---|---|
orientation | Real | [DEPRECATED] Required but not used. |
Returns:
Triggers:
This event is triggered when the ad view is closed by the user.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_APP_OPEN_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_APP_OPEN_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_APP_OPEN_SHOWED
|
unit_id | String | Unit identifier of the advertisement |
Versioning:
-
1.3.0
- This function was introduced.
This function disables showing of App Open Ads when the game resumes.
Note
This is part of the automatic management of the App Open Ad lifecycle, if you with to manually handle it you can turn it of and use the functions AdMob_AppOpenAd_Load and AdMob_AppOpenAd_Show.
Syntax:
AdMob_AppOpenAd_Disable()
Returns:
Versioning:
-
1.3.0
- This function was introduced.
This function returns true
if the automatic management of the App Open Ad lifecycle is enabled, false
otherwise.
Syntax:
AdMob_AppOpenAd_IsEnabled()
Returns:
Versioning:
-
1.4.0
- This function was introduced.
This function should be called when you want to load an app open ad. Calling it will send a request to the ad server to provide an app open 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 the app open ad is loaded or not using the function AdMob_AppOpenAd_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_AppOpenAd_Load()
Returns:
Triggers:
This event is triggered if the awaited task succeeds.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_APP_OPEN_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_APP_OPEN_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 |
Versioning:
-
1.4.0
- This function was introduced.
This function will show the app open ad, if one is available and loaded. You can check whether an ad is available using the function AdMob_AppOpenAd_IsLoaded.
Note
While an app open 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_AppOpenAd_Show()
Returns:
Triggers:
This event is triggered is the ad view is closed by the user.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_APP_OPEN_DISMISSED
|
This event is triggered if the awaited task fails.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_APP_OPEN_SHOW_FAILED
|
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_APP_OPEN_SHOWED
|
Versioning:
-
1.4.0
- This function was introduced.
This function returns whether an app open ad is loaded.
Syntax:
AdMob_AppOpenAd_IsLoaded()
Returns:
Versioning:
-
1.4.0
- This function was introduced.
YoYoGames 2024