Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim timer1 As Timer
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 thread1 As Thread
Private Button1 As Button
Dim Ritorno As Int
Dim FormatoFile As Object
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")
thread1.Initialise("thread1")
'###MODIFICA Marco Rel. 1.21####
Dim jofile As JavaObject
jofile.InitializeContext
FormatoFile = jofile.RunMethod("FW", Null)
Log("File: " & FormatoFile)
Cooffee.RunMethod("setAudioFilter", Array As Object(1))
End Sub
Sub Button1_Click
ProgressDialogShow2("Wait...", False)
timer1.Initialize("timer1", 1000)
timer1.Enabled = True
End Sub
Sub ThreadSub1
thread1.RunOnGuiThread("test", Null)
End Sub
Sub test
Ritorno = Cooffee.RunMethod("doFwUpdate", Array As Object(FormatoFile))
Log("Ritorno: " & Ritorno )
End Sub
Sub Thread1_Ended(fail As Boolean, error As String) 'An error or Exception has occurred in the Thread
Msgbox(error, "Thread1 Ended")
End Sub
Sub timer1_Tick
thread1.Start(Me, "ThreadSub1", Null)
timer1.Enabled = False
End Sub