Android Question android.system.ErrnoException: open failed: EACCES (Permission denied)

Hi everyone, I encountered an issue while uploading a file to FTP. but run VB program,it's ok,upload and download work well . i use code "rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)" in my program, and "AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)" in Manifest, why it doesnt work, i cann't upload my file, occur err: android.system.ErrnoException: open failed: EACCES (Permission denied), “What went wrong?” , who can help to change my code , thanks lot very very much.
(The IP, account, and password in the code are all valid and can be used.)
 

Attachments

  • ftp.rar
    2.1 KB · Views: 128
  • AndroidManifest.xml
    1.8 KB · Views: 155

DonManfred

Expert
Licensed User
Longtime User
whenever you see
B4X:
File.DirRootExternal
you immediatly know it is broken.

 
Upvote 0
yes, i done all what you said,
( If PhoneVer.SdkVersion >=23 Then
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
xui.MsgboxAsync(Result,"Result:")
End If)

manifest
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="30"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

but it doesnt work , always occurs <Permission denied>, what should i do ?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
it seems to have to set phone's Permission to accece files, isn't it?
check the link i posted above. If your app is supposed to be on playstore then you have to use targetsdk 33.
if not then you can use targetsdk 28 like @agraham suggested.
 
Upvote 0
Top