Other Permission Denied Copying File To/From Downloads Folder

Rick Cardon

New Member
Licensed User
Hello all!

I am having issues copying any file to/from the Android Download folder. Searching through forums suggests setting the targeted SDK version to "22". This will in fact work on older versions of Android.

However on a Google Pixel 2 updated as of June 5th 2018 - the APK will not even install while targeting the older SDK (when changing targeted SDK back to 26 install/debugging works fine from B4A-Bridge). B4A-Bridge gets the error: "application not installed". Nothing in Logs from B4A IDE regarding the "application not installed error".

So I am back to solving "Permission Denied". Please see attached screenshots of IDE Logs and code.

What is the best recommended approach to resolving this? Can someone educate me on the best way to perform file copies when dealing with the Download folder?

P.S. I have read DirRootExternal is not the best to copy files into. I have been trying different places while experimenting with this error.


Screenshot of logs and code:
PermissionDeniedError.png
perm-denied002.png
 

Rick Cardon

New Member
Licensed User
Thank you much, sir.

For anyone having similair issues I chose to copy to File.DirInternal for the time being.

File.Copy(Dir, Filename, File.DirInternal, myImageNM)
If File.Exists(File.DirInternal, myImageNM) Then
Msgbox("File copy successful","")
Else
Msgbox("File copy failed.", "")
End If
 
Upvote 0
Top