Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim ActivityRun As Boolean = False 'Flag to test if activity is still running
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.
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("b")
If ActivityRun = False Then 'If the Activity was just called by another, then we will process some data
ActivityRun = True 'Set the flag to True
DoInitialProcessing
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed = True Then ActivityRun = False 'If the user presses the back button, set ActivityRun to false
End Sub