Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim PermissionsGoodFlag As Boolean = True
If PermissionsGoodFlag Then
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, YaeOrNay As Boolean)
If YaeOrNay = False Then
PermissionsGoodFlag = False
End If
End If
If PermissionsGoodFlag Then
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, YaeOrNay As Boolean)
If YaeOrNay = False Then
PermissionsGoodFlag = False
End If
End If
Log("PermissionsGoodFlag = " & PermissionsGoodFlag)
If PermissionsGoodFlag Then
File.WriteString(File.DirRootExternal, "1.txt", "This is the file in the root external directory")
File.MakeDir(File.DirRootExternal, "khab")
Dim KhabDir As String = File.DirRootExternal & "/khab"
File.WriteString(KhabDir, "2.txt", "This is the file in Khab's directory")
Dim D As String = File.DirRootExternal
Log("Dir = " & D)
Log("ReadString = " & File.ReadString(D, "1.txt"))
Dim D As String = KhabDir
Log("Dir = " & D)
Log("ReadString = " & File.ReadString(D, "2.txt"))
End If
End Sub