Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult(perm As String,res As Boolean)
Log(test)
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Dim rp As RuntimePermissions
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
File.WriteString(File.DirRootExternal, "1.txt", "ttt")
End If
End Sub