#Region Project Attributes
#ApplicationLabel: Pub AdMob
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalJar: com.google.android.gms:play-services-base
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Private BannerAd As AdView
Private IAd As InterstitialAd
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
BannerAd.Initialize2("BannerAd", "ca-app-pub-3940256099942544/6300978111", BannerAd.SIZE_SMART_BANNER)
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
'phones
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
'tablets
height = 90dip
End If
Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)
BannerAd.LoadAd
IAd.Initialize("iad", "ca-app-pub-8935643716482518/1013934081")
IAd.LoadAd
End Sub
Sub Activity_Click
If IAd.Ready Then IAd.Show
End Sub
Sub IAD_AdClosed
IAd.LoadAd 'prepare a new ad
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub