#Region Project Attributes
#ApplicationLabel: AppBrain Demo
#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 ap As AppBrain
Dim EditText1 As EditText
Dim banner As AppBrainBanner
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")
ap.Initialize
ap.showInterstitial
' dont call offerWall method without autorization, or you don't get paid.
' via a button, it's Ok
Dim b As Button
b.Initialize("btnOffer")
b.Text=ap.getOfferWallButtonLabel
Activity.AddView(b,0,100%y-50dip,100%x,50dip)
ap.setOfferWallClickListener(b)
banner.Initialize("banner")
Activity.AddView(banner,0,100%y-150dip,100%x,100dip)
banner.Design=2
banner.requestAd
ap.getSetting("news","Hello(from the app)","event_remotesetting")
End Sub
Sub event_RemoteSetting(Setting As String,value As String)
Log(Setting & " " & value)
If Setting="news" Then
EditText1.Text=value
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub banner_onAdRequestDone(result As Boolean)
Log("Banner onAdRequestDone : " & result)
End Sub
Sub banner_onClick
Log("Banner onClick")
End Sub