Android Question Android 13 Save/Load Data

Luis Felipe Andrade

Member
Licensed User
Android 13:
'Dir Internal:
Dim lReader As TextReader
TextReader1.Initialize(File.OpenInput(File.DirInternal & "/bzmonitor" , "server.ini"))
Dim lLine As String
lLine = lReader.ReadLine
pidlocal=lLine
lReader.Close
'Result:java.io.FileNotFoundException: /data/user/0/com.bzmonitor/files/bzmonitor/server.ini: open failed: ENOENT (No such file or directory)

'Canno't create the path permission denied
'*****'
'Dir DEfault External:
Dim lReader As TextReader
TextReader1.Initialize(File.OpenInput(File.DirDefaultExternal & "/bzmonitor" , "server.ini"))
Dim lLine As String
lLine = lReader.ReadLine
pidlocal=lLine
lReader.Close
'Result: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.bzmonitor/files/bzmonitor/server.ini: open failed: EACCES (Permission denied)
'This Works allways great but not anymore in Android 13
Starting with Android 13 I Notice that file.DirInternal and File.DirDefaultExternal do not allow access anymore due to security access, then, where the app will save data? where to load app Images previusly saved? how to read app config text files information?


Please Help! thank you in advance!
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
DirInternal can be used but its a hidden directory. Use

B4X:
xui.DefaultFolder

Check Also if you want to know how to save and load files

 
Upvote 1
Top