The AdMob library allows you to add ads served by AdMob to your application. See the AdMob Tutorial. This library requires some additional configuration as described in the tutorial. By default the view must be set to a size of 320dip x 50dip. Otherwise it will not display. Tablets support three additional sizes: IAB_BANNER - 468dip x 60dip, IAB_MRECT - 300dip x 250dip and IAB_LEADERBOARD - 728dip x 90dip. The size of AdView must match the selected size. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Initializes the AdView using the default 320dip x 50dip size. EventName - Name of Subs that will handle the events. PublisherId - The publisher id you received from AdMob.
Initializes the AdView. EventName - Name of Subs that will handle the events. PublisherId - The publisher id you received from AdMob. Size - One of the SIZE constants.
Ad will use the full available width automatically. You can use this code to add such an ad to the bottom of the screen: Adview1.Initialize2("Ad", "xxxxxxxx", AdView1.SIZE_SMART_BANNER)
DimheightAsInt IfGetDeviceLayoutValues.ApproximateScreenSize < 6Then 'phones If100%x > 100%yThenheight = 32dipElseheight = 50dip Else 'tablets height = 90dip EndIf Activity.AddView(AdView1, 0dip, 100%y - height, 100%x, height)