Android Question Android 4.4 restricted user write to SDexternal

padvou

Active Member
Licensed User
Longtime User
Why does the following code fail:
B4X:
File.Copy(File.DirInternal ,"client.db", "/storage/extSdCard/Android/data/uop.unicollect/files", "/unicollect/DBbak/" & "bak_client.db")
The External SDcard location is correct since the code runs correctly with the main user.
 

padvou

Active Member
Licensed User
Longtime User
I also tried this:
B4X:
Sub SaveStringExample
Try
    File.WriteString("/storage/extSdCard/Android/data/uop.unicollect/files/unicollect/DBbak/", "String.txt", _
        "This is some string" & CRLF & "and this is another one.")

Catch
Log(LastException.Message)
Msgbox(LastException.Message, "ERRor")
End Try
End Sub

And get this exception:
B4X:
libcore.io.ErrnoException: open failed: EACCES (Permission denied)
 
Upvote 0
Top