Android Question Can't see B4A written files on USB connected.

lordbb

Member
Licensed User
Longtime User
Sorry if this has been answered-and being long winded.
My app writes small text files to a folder. The design is for the user to later connect the device to a PC, via USB and copy the files to the PC. The problem is the files can't be seen.
Using a file explorer, such as ES file manager, the files are there. They are just invisible to the PC.
In a seemingly related weirdness, my app also reads and writes to files that the user installs on the Droid via USB. These files remain visible to the USB connected computer, BUT after I write new information to the file, when I try and copy it back to the PC it has been truncated. Again looking at the file using ES file manager, it is just fine. It just can't be copied via USB. I'm seeing this behavior on no less than 4 different tablets/phones so I think it B4A thing.
I'm using TextWriter as my IO object.
Ideas?

Thanks in advance.
 

DouglasNYoung

Active Member
Licensed User
Longtime User
Iordbb,
I've experienced this too - I'm pretty sure it's not a B4A issue, otherwise ES wouldn't see the files either - If you disconnect the USB and reconnect the files magically appear to the PC - I presume it's the PC connectivity not seeing that the file has changed since it first connected!

Cheers,
Douglas
 
Upvote 0

lordbb

Member
Licensed User
Longtime User
Iordbb,
I've experienced this too - I'm pretty sure it's not a B4A issue, otherwise ES wouldn't see the files either - If you disconnect the USB and reconnect the files magically appear to the PC - I presume it's the PC connectivity not seeing that the file has changed since it first connected!

Cheers,
Douglas
Thanks Douglas. Thing is, this isn't something that I've just seen recently. Been dealing with it for months. That is- MANY connect/disconnects between computer and device. And like you, I've seen times when files do seem to reappear.. Problem now is, USERS are asking, "What the heck is going on?" I have no answer.
I've long thought it might be an Android issue, rather than B4A -- EXCEPT that when files that were OK to read, stop being OK once B4A writes to them. Again, Android-usb-pc may be the real issue. I just don't know where else to ask.

b
 
Upvote 0
Top