Hello guys!
I've tried searching about this issue but there doesn't seem to exist much information.
Here is my code:
AppSettings
Save/Load file
After I start the application, it shows this error:
Error in sub:savefile. java.io.FileNotFoundException: /storate.txt (read-only file system). Is this a phone issue or what?
Sorry, tried searching myself and I am asking because I haven't found anything which solves it for me.
I've tried searching about this issue but there doesn't seem to exist much information.
Here is my code:
AppSettings
B4X:
' File storage
Dim mainStorageDir As String : mainStorageDir = File.DirInternal
Dim mainStorageFile As String : mainStorageDir = "storage.txt"
Save/Load file
B4X:
Sub loadFile()
If(File.Exists(AppSettings.MainStorageDir, AppSettings.MainStorageFile) = False) Then
saveFile
End If
filesMap = File.ReadMap(AppSettings.MainStorageDir, AppSettings.MainStorageFile)
End Sub
Sub saveFile()
If(filesMap.IsInitialized = False) Then
filesMap.Initialize
End If
File.WriteMap(AppSettings.MainStorageDir, AppSettings.MainStorageFile, filesMap)
End Sub
After I start the application, it shows this error:
Error in sub:savefile. java.io.FileNotFoundException: /storate.txt (read-only file system). Is this a phone issue or what?
Sorry, tried searching myself and I am asking because I haven't found anything which solves it for me.