Sub Process_Globals
'Get permission to write file
Private rp As RuntimePermissions
End Sub
Sub Activity_Create(FirstTime As Boolean)
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
End Sub
'Event sub example
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
Select Case Permission
Case rp.PERMISSION_WRITE_EXTERNAL_STORAGE
If Result = True Then
infocheck1.Initialize("")
If File.Exists(File.DirRootExternal &"/extractsrt/", "infocheck.txt") == False Then
File.WriteString(File.DirRootExternal &"/extractsrt/", "infocheck.txt","0")
else if File.Exists(File.DirRootExternal &"/extractsrt/", "infocheck.txt") == True Then
Log(File.ReadList(File.DirRootExternal &"/extractsrt/", "infocheck.txt"))
End If
Else
ToastMessageShow("You have not permission to write external storage", True)
End If
End If
End Select
End Sub