Android Question Connecting to USB storage using otg

Meigionel TS

Member
Licensed User
I am looking for a way to copy a file from File.DirDefaultExternal to the root folder of any usb storage device connected with the mobile using otg. I looked at the reference codes of the standard USB library to figure out a way but I am struggling and could not figure out. Here is a snippet of the wrong code:

B4X:
Sub Btn_click
   File.copy(File.DirDefaultExternal, "more.txt", "THE ROOT PATH OF THE USB DEVICE WHICH I COULD NOT FIGURE OUT", "more.txt")
End Sub

I realize that this question has been asked once but not been answered.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…