The CAS.AI (CleverAdsSolutions) extension lets you display banner, interstitial and rewarded ads.
Official website https://cas.ai Official andrdoid documentation https://github.com/cleveradssolutions/CAS-Android/wiki
NOTE: Banners are not implemented. Extension supports Android only for now.
Open game.project and add a new entry to the dependencies property:
https://github.com/Lerg/extension-cas/archive/master.zip
Then select Project -> Fetch Libraries to download the extension in your project.
If you are using Admob you need to set the AdMob App Id for your iOS and/or Android app in game.project. To do so open your game.project and add these lines:
[cas]
admob_android_app_id = ca-app-pub-***~***
To control which ad providers are integrated add these lines to the [cas] section in game.project:
adcolony_android = 1
admob_android = 1
applovin_android = 1
bigo_android = 1
charboost_android = 1
facebook_android = 1
fyber_android = 1
hyprmx_android = 1
inmobi_android = 0
ironsource_android = 1
kidoz_android = 0
liftoff_android = 1
mintegral_android = 1
mytarget_android = 0
pangle_android = 1
superawesome_android = 0
unityads_android = 1
yandex_android = 1
Replace ca-app-pub-***~*** with your app ids. It can now be viewed or changed in the normal view of the game.project file.
Initializes the extension. This function has to be called first before trying to show any ads.
params: table Contains parameters for the call — see the next section for details.id: string CAS application ID.disable_banner: boolean Iftrueno banners loading.disable_interstitial: boolean Iftrueno interstitial loading.disable_rewarded: boolean Iftrueno rewarded loading.test_device: string Test device ID to enable testing on this device.test: boolean Iftruethe test ads will be served. ALWAYS use the test ads during development.debug: boolean Iftrueadditional debug messages.listener: function The callback function which receives all CAS events.
Prints to console SDK integration information.
Loads a specified ad type. No need to call this function, the ads is loaded automatically.
ad_type: numbercas.BANNER,cas.INTERSTITIALorcas.REWARDED.
Returns true if the specified ad type has been loaded.
ad_type: numbercas.BANNER,cas.INTERSTITIALorcas.REWARDED.- return:
is_loaded: boolean.
Displays a loaded ad.
ad_type: numbercas.BANNER,cas.INTERSTITIALorcas.REWARDED.
Removes a loaded banner from the screen.
Changes settings.
-
param: number Parameter id. -
value: number|boolean|table Value id or value itself. -
cas.TAGGED_AUDIENCE:cas.AUDIENCE_CHILDRENcas.AUDIENCE_NOT_CHILDRENcas.AUDIENCE_UNDEFINED
-
cas.USER_CONSENT:cas.CONSENT_ACCEPTEDcas.CONSENT_DENIED
-
cas.CCPA:cas.CCPA_OPT_IN_SALEcas.CCPA_OPT_OUT_SALE
-
cas.TARGETING_GENDER:cas.GENDER_UNKNOWNcas.GENDER_MALEcas.GENDER_FEMALE
-
cas.TARGETING_AGE:value: number Age as a number.
-
cas.TARGETING_KEYWORDS:value: table Array of string keywords.
-
cas.MUTED_AD_SOUNDS:value: boolean Muted iftrue.
phase: number Event phase.type: number Event type.
phase:cas.INITtype:cas.INITprotection_applied: boolean.user_country_iso2O: string Nullable.error: string Nullable.
phase:cas.LOADEDcas.FAILED_TO_LOAD
type:cas.BANNERcas.INTERSTITIALcas.REWARDED.
phase:cas.SHOWNcas.FAILEDcas.CLICKEDcas.COMPLETEcas.CLOSED
type:cas.INTERSTITIALcas.REWARDED
If you like this extension please consider supporting me on Patreon https://patreon.com/Lerg