Ads:showAd: Difference between revisions
From GiderosMobile
No edit summary |
No edit summary |
||
| (9 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
'''Class:''' [[Ads]]<br/> | |||
=== Description === | === Description === | ||
Displays provided ad type with any other additional information. | |||
<syntaxhighlight lang="lua"> | |||
< | Ads:showAd(...) | ||
</syntaxhighlight> | |||
</ | |||
Possible values: | |||
<syntaxhighlight lang="lua"> | |||
-- AdColony | |||
--load/display video | |||
adcolony:showAd("video") | |||
adcolony:showAd("video", videoZoneID) | |||
--display video for currency | |||
adcolony:showAd("v4vc"[, videoZoneID]) | |||
--offer video for currency | |||
adcolony:showAd("v4vc"[, videoZoneID, true]) | |||
-- Admob | |||
--smart banner | |||
admob:showAd("auto", unitID) | |||
admob:showAd("banner", unitID) | |||
admob:showAd("iab_banner", unitID) | |||
admob:showAd("iab_leaderboard", unitID) | |||
admob:showAd("iab_mrect", unitID) | |||
admob:showAd("iab_skyscaper", unitID) | |||
admob:showAd("smart_banner", unitID) | |||
admob:showAd("interstitial", unitID) | |||
-- Amazon | |||
--determines size based on screen resolution | |||
amazon:showAd("auto") | |||
-- or | |||
amazon:showAd("300x50") | |||
amazon:showAd("320x50") | |||
amazon:showAd("300x250") | |||
amazon:showAd("600x90")--android only | |||
amazon:showAd("728x90") | |||
amazon:showAd("1024x50") | |||
--interstitial | |||
amazon:showAd("interstitial") | |||
-- AppLovin | |||
applovin:showAd("auto") | |||
applovin:showAd("banner") | |||
applovin:showAd("leader")--android only | |||
applovin:showAd("mrec")--android only | |||
applovin:showAd("interstitial") | |||
-- Chartboost | |||
--interstitial | |||
chartboost:showAd("interstitial") | |||
chartboost:showAd("moreapps") | |||
chartboost:showAd("v4vc") | |||
chartboost:showAd("feed") --ios only | |||
-- HeyZap | |||
--interstitial | |||
heyzap:showAd("interstitial") | |||
heyzap:showAd("video") | |||
heyzap:showAd("v4vc") | |||
-- iAds | |||
--interstitial | |||
iad:showAd("interstitial") | |||
--auto sized banner | |||
iad:showAd("banner") | |||
-- InMobi | |||
--auto sized banner | |||
inmobi:showAd("auto") | |||
--or | |||
inmobi:showAd("300x250") | |||
inmobi:showAd("728x90") | |||
inmobi:showAd("468x60") | |||
inmobi:showAd("120x600") | |||
inmobi:showAd("320x50") | |||
-- Millenial | |||
--optionally can provide APID as second parameter | |||
mm:showAd("auto") | |||
mm:showAd("banner") | |||
mm:showAd("med_banner") | |||
mm:showAd("iab_leaderboard") | |||
mm:showAd("rectangle") | |||
mm:showAd("interstitial") | |||
-- MoPub | |||
--if ad unit is not provided | |||
--will use default ad unit | |||
--set by setKey method | |||
mopub:showAd("banner") | |||
mopub:showAd("interstitial") | |||
--or you can provide different ad unit | |||
--for each ad | |||
mopub:showAd("banner", adunit) | |||
mopub:showAd("interstitial", adunit) | |||
-- Revmob | |||
--auto sized banner | |||
revmob:showAd("auto") | |||
--or | |||
revmob:showAd("interstitial") | |||
revmob:showAd("link") | |||
revmob:showAd("popup") | |||
-- Samsung AdHub | |||
--auto sized banner | |||
samsung:showAd("auto") | |||
--or | |||
samsung:showAd("small_banner") | |||
samsung:showAd("rectangle_banner") | |||
samsung:showAd("medium_banner") | |||
samsung:showAd("large_banner") | |||
--or interstitial | |||
samsung:showAd("interstitial") | |||
--or video ad | |||
samsung:showAd("video") | |||
--you can also specify | |||
--another inventory ID | |||
--as second parameter | |||
samsung:showAd("small_banner", inventoryID) | |||
samsung:showAd("interstitial", inventoryID) | |||
--etc | |||
-- TapForTap | |||
tapfortap:showAd("banner") | |||
tapfortap:showAd("interstitial") | |||
tapfortap:showAd("moreapps") | |||
-- TapJoy | |||
--auto sized banner | |||
tapjoy:showAd("auto") | |||
--or | |||
tapjoy:showAd("320x50") | |||
tapjoy:showAd("640x100") | |||
tapjoy:showAd("768x90") | |||
--or interstitial | |||
tapjoy:showAd("interstitial") | |||
--or offers | |||
tapjoy:showAd("offers") | |||
-- Unity | |||
--auto sized banner | |||
unity:showAd("auto") | |||
-- Vungle | |||
--display video ad | |||
vungle:showAd("video") | |||
--display video for currency | |||
vungle:showAd("v4vc"[, "username"]) | |||
</syntaxhighlight> | |||
=== Parameters === | === Parameters === | ||
'''...''': (varies) | '''...''': (varies) varies for each ad framework<br/> | ||
{{Ads}} | |||
Latest revision as of 01:56, 16 February 2025
Available since: Gideros 2011.6
Class: Ads
Description
Displays provided ad type with any other additional information.
Ads:showAd(...)
Possible values:
-- AdColony
--load/display video
adcolony:showAd("video")
adcolony:showAd("video", videoZoneID)
--display video for currency
adcolony:showAd("v4vc"[, videoZoneID])
--offer video for currency
adcolony:showAd("v4vc"[, videoZoneID, true])
-- Admob
--smart banner
admob:showAd("auto", unitID)
admob:showAd("banner", unitID)
admob:showAd("iab_banner", unitID)
admob:showAd("iab_leaderboard", unitID)
admob:showAd("iab_mrect", unitID)
admob:showAd("iab_skyscaper", unitID)
admob:showAd("smart_banner", unitID)
admob:showAd("interstitial", unitID)
-- Amazon
--determines size based on screen resolution
amazon:showAd("auto")
-- or
amazon:showAd("300x50")
amazon:showAd("320x50")
amazon:showAd("300x250")
amazon:showAd("600x90")--android only
amazon:showAd("728x90")
amazon:showAd("1024x50")
--interstitial
amazon:showAd("interstitial")
-- AppLovin
applovin:showAd("auto")
applovin:showAd("banner")
applovin:showAd("leader")--android only
applovin:showAd("mrec")--android only
applovin:showAd("interstitial")
-- Chartboost
--interstitial
chartboost:showAd("interstitial")
chartboost:showAd("moreapps")
chartboost:showAd("v4vc")
chartboost:showAd("feed") --ios only
-- HeyZap
--interstitial
heyzap:showAd("interstitial")
heyzap:showAd("video")
heyzap:showAd("v4vc")
-- iAds
--interstitial
iad:showAd("interstitial")
--auto sized banner
iad:showAd("banner")
-- InMobi
--auto sized banner
inmobi:showAd("auto")
--or
inmobi:showAd("300x250")
inmobi:showAd("728x90")
inmobi:showAd("468x60")
inmobi:showAd("120x600")
inmobi:showAd("320x50")
-- Millenial
--optionally can provide APID as second parameter
mm:showAd("auto")
mm:showAd("banner")
mm:showAd("med_banner")
mm:showAd("iab_leaderboard")
mm:showAd("rectangle")
mm:showAd("interstitial")
-- MoPub
--if ad unit is not provided
--will use default ad unit
--set by setKey method
mopub:showAd("banner")
mopub:showAd("interstitial")
--or you can provide different ad unit
--for each ad
mopub:showAd("banner", adunit)
mopub:showAd("interstitial", adunit)
-- Revmob
--auto sized banner
revmob:showAd("auto")
--or
revmob:showAd("interstitial")
revmob:showAd("link")
revmob:showAd("popup")
-- Samsung AdHub
--auto sized banner
samsung:showAd("auto")
--or
samsung:showAd("small_banner")
samsung:showAd("rectangle_banner")
samsung:showAd("medium_banner")
samsung:showAd("large_banner")
--or interstitial
samsung:showAd("interstitial")
--or video ad
samsung:showAd("video")
--you can also specify
--another inventory ID
--as second parameter
samsung:showAd("small_banner", inventoryID)
samsung:showAd("interstitial", inventoryID)
--etc
-- TapForTap
tapfortap:showAd("banner")
tapfortap:showAd("interstitial")
tapfortap:showAd("moreapps")
-- TapJoy
--auto sized banner
tapjoy:showAd("auto")
--or
tapjoy:showAd("320x50")
tapjoy:showAd("640x100")
tapjoy:showAd("768x90")
--or interstitial
tapjoy:showAd("interstitial")
--or offers
tapjoy:showAd("offers")
-- Unity
--auto sized banner
unity:showAd("auto")
-- Vungle
--display video ad
vungle:showAd("video")
--display video for currency
vungle:showAd("v4vc"[, "username"])
Parameters
...: (varies) varies for each ad framework