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 objLog As LogCat
Dim Args(1) As String
Dim Button1 As Button
Dim Button2 As Button
Dim Button3 As Button
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("main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub objLog_LogCatData (Buffer() As Byte, Length As Int)
Dim data As String
data = BytesToString(Buffer,0,Length,"UTF-8")
WriteIni("data", data,File.DirRootExternal,"logcatxxx.ini")
End Sub
Sub WriteIni(mykey As String,myvalue As String,fPath As String,filename As String)
Dim Map1 As Map
Map1.Initialize
If File.Exists(fPath,filename) Then
Else
File.WriteMap(fPath, filename, Map1) 'to create it if not exist
End If
Map1 = File.ReadMap(fPath,filename)
Map1.Put(mykey, myvalue)
File.WriteMap(fPath, filename, Map1)
End Sub
Sub Button1_Click
objLog.LogCatStart(Args,"objLog")
End Sub
Sub Button2_Click
Log("HELLO!")
End Sub
Sub Button3_Click
objLog.LogCatStop
End Sub