Skip to content

Constants

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

Constants

The following are the available constants to use with the AdMob API.

Constants

This module includes a set of predefined constants that can be utilized for various purposes. Browse through the available constants to find values relevant to your needs and enhance the efficiency of your code.



Back To Top

AdMobErrors

This set of constants represents the error values that can be returned from the AdMob function calls.

These constants are referenced by the following functions:


Member Description
ADMOB_OK There were no errors.
ADMOB_ERROR_NOT_INITIALIZED The AdMob extension needs to be initialized prior to this call
ADMOB_ERROR_INVALID_AD_ID The provided ad unit ID is not valid.
ADMOB_ERROR_AD_LIMIT_REACHED The limit of loaded ads for this specific type was reached.
ADMOB_ERROR_NO_ADS_LOADED There are no loaded ads to be shown for this specific type.
ADMOB_ERROR_NO_ACTIVE_BANNER_AD There is no active banner ad.
ADMOB_ERROR_ILLEGAL_CALL The call you are trying to execute is illegal (used for functions that need to be called prior to initialization).
ADMOB_ERROR_NULL_VIEW_HANDLER The view handler responsible for rendering the ads is not available (only available on Android).


Back To Top

AdMobAdValuePrecision

This set of constants represents the precision type of the reported ad value.

These constants are referenced by the following functions:


Member Description
ADMOB_ADVALUE_PRECISION_UNKNOWN An unknown precision type.
ADMOB_ADVALUE_PRECISION_ESTIMATED An ad value estimated from aggregated data.
ADMOB_ADVALUE_PRECISION_PRECISE The precise value paid for this ad.
ADMOB_ADVALUE_PRECISION_PUBLISHER_PROVIDED A publisher-provided ad value, such as manual CPMs in a mediation group.


Back To Top

AdMobBanner

This set of constants represents the various types of available banner.


Member Description
AdMob_Banner_NORMAL Normal sized banner (320x50 dp)
AdMob_Banner_LARGE Large sized banner (320x100 dp)
AdMob_Banner_MEDIUM IAB medium rectangle (300x250 dp)
AdMob_Banner_FULL IAB full-size banner (468x60 dp - tablets only)
AdMob_Banner_LEADERBOARD IAB leaderboard (728x90 dp - tablets only)
AdMob_Banner_SMART A dynamic size banner (deprecated, see AdMob_Banner_ADAPTIVE)
AdMob_Banner_ADAPTIVE A dynamically sized banner


Back To Top

AdMobBannerAlignment

This set of constants represents the banner alignment style.

These constants are referenced by the following functions:


Member Description
ADMOB_BANNER_ALIGNMENT_LEFT Left aligns the banner being created.
ADMOB_BANNER_ALIGNMENT_CENTER Center aligns the banner being created
ADMOB_BANNER_ALIGNMENT_RIGHT Right aligns the banner being created


Back To Top

AdMobContentRating

This set of constants represents the various types of possible content ratings for ads.

These constants are referenced by the following functions:


Member Description
AdMob_ContentRating_GENERAL Content suitable for general audiences.
AdMob_ContentRating_PARENTAL_GUIDANCE Content suitable for most audiences with parental guidance.
AdMob_ContentRating_TEEN Content suitable for teen and older audiences.
AdMob_ContentRating_MATURE_AUDIENCE Content suitable only for mature audiences.


Back To Top

AdMobConsentStatus

This set of constants represents the various consent status.

These constants are referenced by the following functions:


Member Description
AdMob_Consent_Status_UNKNOWN Consent status is unknown.
AdMob_Consent_Status_NOT_REQUIRED User consent not required.
AdMob_Consent_Status_REQUIRED User consent required but not yet obtained.
AdMob_Consent_Status_OBTAINED User consent obtained. Personalized vs non-personalized undefined.


Back To Top

AdMobConsentType

This set of constants represents the given consent type.

These constants are referenced by the following functions:


Member Description
AdMob_Consent_Type_UNKNOWN Consent type is unknown (before consent was requested).
AdMob_Consent_Type_NON_PERSONALIZED Consent was given for non-personalized ads.
AdMob_Consent_Type_PERSONALIZED Consent was given for personalized ads.
AdMob_Consent_Type_DECLINED Consent was declined for any kind of ads.


Back To Top

AdMobConsentMode

This set of constants represents the consent mode (these are used for testing porpuses).

These constants are referenced by the following functions:


Member Description
AdMob_Consent_Mode_DEBUG_GEOGRAPHY_DISABLED Debug geography disabled.
AdMob_Consent_Mode_DEBUG_GEOGRAPHY_EEA Geography appears as in EEA for debug devices.
AdMob_Consent_Mode_DEBUG_GEOGRAPHY_NOT_EEA Geography appears as not in EEA for debug devices.
AdMob_Consent_Mode_PRODUCTION Same as AdMob_Consent_Mode_DEBUG_GEOGRAPHY_DISABLED, used for production.


Back To Top

AdMobEvent

This set of constants represents all the available event types that can be created by the AdMob extension. They are the value assigned to the type member of the async_load when an Social Async Event is triggered.

These constants are referenced by the following functions:


Member Description
ADMOB_EV_INITIALIZED The extension was successfuly initialized.
ADMOB_EV_CONSENT_INFO_UPDATED The consent information was updated.
ADMOB_EV_CONSENT_INFO_UPDATE_FAILED The consent information failed to update.
ADMOB_EV_CONSENT_LOADED The consent form loaded successfuly.
ADMOB_EV_CONSENT_LOAD_FAILED The consent form failed to load.
ADMOB_EV_CONSENT_SHOWED The consent form was properly showed.
ADMOB_EV_CONSENT_SHOW_FAILED The consent form failed to show.
ADMOB_EV_BANNER_LOADED The banner ad loaded successfuly.
ADMOB_EV_BANNER_LOAD_FAILED The banner ad failed to load.
ADMOB_EV_INTERSTITIAL_LOADED The insterstitial ad loaded successfuly.
ADMOB_EV_INTERSTITIAL_LOAD_FAILED The insterstitial ad failed to load.
ADMOB_EV_INTERSTITIAL_SHOWED The insterstitial ad was properly showed.
ADMOB_EV_INTERSTITIAL_SHOW_FAILED The insterstitial ad failed to show.
ADMOB_EV_INTERSTITIAL_DISMISSED The insterstitial ad was dismissed.
ADMOB_EV_REWARDED_LOADED The rewarded ad loaded successfuly.
ADMOB_EV_REWARDED_LOAD_FAILED The rewarded ad failed to load.
ADMOB_EV_REWARDED_SHOWED The rewarded ad was properly showed.
ADMOB_EV_REWARDED_SHOW_FAILED The rewarded ad failed to show.
ADMOB_EV_REWARDED_DISMISSED The rewarded ad was dismissed.
ADMOB_EV_REWARDED_REWARD The rewarded ad was fully watched and the user should be rewarded.
ADMOB_EV_REWARDED_INTERSTITIAL_LOADED The rewarded interstitial ad loaded successfuly.
ADMOB_EV_REWARDED_INTERSTITIAL_LOAD_FAILED The rewarded interstitial ad failed to load.
ADMOB_EV_REWARDED_INTERSTITIAL_SHOWED The rewarded interstitial ad was properly showed.
ADMOB_EV_REWARDED_INTERSTITIAL_SHOW_FAILED The rewarded interstitial ad failed to show.
ADMOB_EV_REWARDED_INTERSTITIAL_DISMISSED The rewarded interstitial ad was dismissed.
ADMOB_EV_REWARDED_INTERSTITIAL_REWARD The rewarded interstitial ad was fully watched and the user should be rewarded.
ADMOB_EV_APP_OPEN_LOADED The app open ad ad failed to load.
ADMOB_EV_APP_OPEN_LOAD_FAILED The app open ad ad failed to load.
ADMOB_EV_APP_OPEN_SHOWED The app open ad was properly showed.
ADMOB_EV_APP_OPEN_SHOW_FAILED The app open ad was dismissed.
ADMOB_EV_APP_OPEN_DISMISSED The app open ad was dismissed.
ADMOB_EV_PAID The displayed ad was estimated to have earned money.