Android Question DirRootExternal

DPaul

Active Member
Licensed User
Longtime User
Hi,

I've reported this before, but unless I do not understand it, it's strange.

I was led to believe that you cannot write directly to the device ( = Tablet Samsung Galaxy Tab A (2016))
but dirRootExternal writes to the SDcard inserted.

This is my statement to write XML files, it does so wonderfully:
File.WriteString( File.DirRootExternal,filnam, xmlWriter.asString2(props))

But, it does not write to the SDcard, it writes to the root of the tablet.
Now i want the file on my destop, connected via USB.
At first i cannot see it from the desktop, but either after many "refresh" (F5) actions, or, after dis- and reconnecting the tablet, i can see and copy it directly to the desktop.
What am I missing here ? New feature, rewrite the manual ?

Thx,
Paul
 

DPaul

Active Member
Licensed User
Longtime User
OK, thanks. Is news to me !
I would suggest changing the function name to "DirSDinternal", that would make sense to me.
But perhaps i'm the only one who feels like that :)

BTW. This does not explain why I cannot see the file on my desktop at first.
But only after I physically dis- and reconnect (USB) the tablet.
Is not a problem really, because data are collected in tablet standalone mode,
and only later transferred to a PC. Just curious why.

Paul
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I would suggest changing the function name to "DirSDinternal", that would make sense to me.
But perhaps i'm the only one who feels like that
The name is indeed a bit confusing. On the first versions of Android there was no secondary storage available so it was really pointing to the external storage.

But only after I physically dis- and reconnect (USB) the tablet.
Try to force media scanner to scan the file: https://www.b4x.com/android/forum/threads/force-media-scanner-on-deleted-file.25794/#post-214985
 
Upvote 0

DPaul

Active Member
Licensed User
Longtime User
Try to force media scanner to scan the file: https://www.b4x.com/android/forum/threads/force-media-scanner-on-deleted-file.25794/#post-214985[/QUOTE]

I am trying to "see" the file from my desktop, as soon as it is created on the tablet. (Now still USB connected while developing)
A few minutes ago I found that is is possible to do that without disconnecting the device:
Instead of clicking (desktop) on Samsung Galaxy/tablet/...
I click on Samsung Galaxy/Card/... first. There are some dirs that make no sense to me, but i click around a few times, press F5
then I click Samsung Galaxy/tablet/...and after some tries, there it is !
Magic.
Paul
 
Upvote 0
Top