Problems writing to USB flash drive

Walter

Member
Licensed User
In my application I want to captured data
Save by Button Click on a USB stick.
Tablet Android 4.2

And I get the following error:
open failed: AEACCES (Permission denied)

When reading files in the USB flash drive I have no problems!

Are there simple and really working example?
 

DonManfred

Expert
Licensed User
Do you have added the right permission to your manifest?
B4X:
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
I dont know from which android version the access to external storage is limited by google... Maybe 4+

In this case you should use
B4X:
File.DirDefaultExternal
 

Walter

Member
Licensed User
Thanks for the information
Error has remained

File.Copy (File.DirRootExternal, "INI.txt", "/ mnt/usbhost1", "INI.txt")
 

Walter

Member
Licensed User
only at our Info
the App it is natural
File.Copy (File.DirRootExternal, "INI.txt", "/mnt/usbhost1", "INI.txt")

Same mistake!
 

Walter

Member
Licensed User
at 4.3 it works
4.2.2 when it does not work
both devices are not rooted

available at 4.2.2 Additional settings?
root manger says setting = r / w
 
Top