Last active
April 23, 2018 06:31
-
-
Save marchbold/17b56037d952ce8e29cd to your computer and use it in GitHub Desktop.
This very simple example demonstrates initialising the extension and the advertising platform and then displaying an advert aligned to the bottom centre.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Adverts.isSupported) | |
{ | |
Adverts.service.initialisePlatform( AdvertPlatform.PLATFORM_ADMOB ); | |
var adView:AdView = Adverts.service.createAdView(); | |
adView.setAdSize( AdSize.SMART_BANNER ); | |
adView.setAdUnitId( AD_UNIT_ID ); | |
adView.setViewParams( new AdViewParamsBuilder() | |
.setVerticalAlign( AdViewParams.ALIGN_BOTTOM ) | |
.setHorizontalAlign( AdViewParams.ALIGN_CENTER ) | |
.build() | |
); | |
adView.load( new AdRequestBuilder().build() ); | |
adView.show(); | |
} | |
// com.distriqt.Adverts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://airnativeextensions.com/extension/com.distriqt.Adverts