Hello World
- Methods

The AdView is a control which makes it possible to earn money with your app.

adv = app.CreateAdView( unitId, testId, width, height, options ) → app object: AdView

Note: This function is a premium feature. Please consider subscribing to Premium to use this feature and support DroidScript in its further development.

The AdView shows advertisement banners from the popular AdMob platform. (Further providers may be added in the future)

NOTE: Ads are not touchable when running in the DroidScript IDE.

To put ads in your app you must first create an AdMob account
Then create the view and add it to your app as shown in the Banner Ads sample

When finally publishing the app on GooglePlay remember to 'include ads' in the developer console.

Warning: Don't repeatedly click on your own ads unless you are using a valid testId, or Google may suspend your Admob account!

To read general infos about how AdMob works in android visit the Google Developer Page

If you have trouble implementing ads please visit the admob troubleshooter


The following methods are available on the AdView object:

GetType() → String: “AdView”
Number: fraction (0..1)
function( status )
Returns the control class name.
Loads an advertising banner.
Called when the AdView status changed. A List of StatusCodes can be obtained by the AdView source.