Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim storage As env
Dim paths As Map
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")
paths = storage.Initialize
For i = 0 To paths.Size-1
Log(paths.GetKeyAt(i)&"="&paths.GetValueAt(i))
Next
Dim de As String = File.DirRootExternal
Log ("DirRootExternal = "&de)
Dim mtc As Matcher = Regex.Matcher("(/|\\)[^(/|\\)]*(/|\\)",de)
Dim extsdcard As String = de
If mtc.Find = True Then
Dim mnt As String = mtc.Group(0)
Log ("mount point = "& mnt)
Dim dirs As List = File.ListFiles(mnt)
For Each f As String In dirs
If storage.isExternalStorageRemovable(mnt&f) Then
Log ("Device = "& f&":"&mnt&f&" is removable")
If File.ListFiles(mnt&f).IsInitialized Then
Log("probably ExtSDCard: "&mnt&f)
extsdcard = mnt&f
Else
'Log("Problem reading "&mnt&f)
End If
Else
Log ("Device = "& f&":"&mnt&f&" is NOT removable")
End If
Next
End If
Log("extsdcard probably="&extsdcard)
For Each f As String In File.ListFiles(extsdcard)
Log(">"&f)
Next
End Sub