#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#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
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim banner As MobVistaBanner
Dim bubble As MobVistaFloatAdView
Dim interstitial As MobVistaInterstitial
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
interstitial.Initialize()
banner.Initialize("","banner",20)
bubble.Initialize("")
Activity.AddView(banner,0,100%y-60dip,100%x,60dip)
Dim b1, b2, b3 As Button
b1.Initialize("b1")
b1.Text="OverlayAd"
b2.Initialize("b2")
b2.Text="AppWall"
b3.Initialize("b3")
b3.Text="FullScreenAd"
Activity.AddView(b1,10%x,10dip,80%x,50dip)
Activity.AddView(b2,10%x,70dip,80%x,50dip)
Activity.AddView(b3,10%x,130dip,80%x,50dip)
End Sub
Sub Activity_Resume
bubble.onResume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
bubble.onPause
End Sub
Sub b1_click
interstitial.showOverlayAd("")
End Sub
Sub b2_click
interstitial.showAppWall("")
End Sub
Sub b3_click
interstitial.showFullScreenAd("")
End Sub