I want to write file to external storage on my emulator, however I meet the following error. Do I need to get permission to write file on external storage ?
Thanks
Mak
Error : java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.example/files/introb4a.txt (No such file or directory).....
Code :
B4X:
Private Sub btWrite_Click
Dim fdName,tarDir As String
tarDir = File.DirDefaultExternal
fdName = "introb4a.txt"
'Write to external
If File.ExternalWritable Then
File.WriteList(tarDir,fdName,contList) -< Error Occur here !
ToastMessageShow("Just save the file",False)
Else
ToastMessageShow("Cannot Save the File",False)
End If
End Sub
Many things have changed in B4X and also in the underlying platforms. I will try to list here all kinds of (old) features that have better alternatives. B4X is backward compatible so these features still work. The recommendations are more relevant for new projects or when implementing new...