File.DirInternal??

prokli

Active Member
Licensed User
Longtime User
Hi everybody!

I'm trying to create a new file and put some text to it.

Code:
File.WriteString(File.DirInternal, "vcpcnf.txt", "Test")
Msgbox("Created new configuration, refer to " & File.DirInternal ,"")

Message box outputs the information:
"Created new configuration, refer to /data/data/prokli.b4a.filetest/files"

The code seems to be okay (no error message)

Problem:
I cannot find that folder and even not the file on my tablet-pc (I am using the ES File Explorer app)

Has anybody any idea??
Regards,
Harald:
sign0085:
 

stevel05

Expert
Licensed User
Longtime User
File.DirInternal writes to the application area on the device. You won't usually find this with a file manager.

If you want to see the file you can use File.DirDefaultExternal to write to the application area on the external storage (maybe SDCard or Nand depending on your device) it will be something like Android\<package-name>\files ...

or File.DirRootExternal for the root of the external storage.

Steve
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Upvote 0

prokli

Active Member
Licensed User
Longtime User
Thanks, Steve!

I'm not very familar with the Android file system (may be this is even typically for Linux?!).
In the meantime, I am using the SD card of my tablet, which works fine.
I thought, if someone would like to use my apk and does not own a mobile or table pc including external memory, I would have to store such a file to internal memory.
The file should be configurable by the user, since it keeps stuff like IP address, port number etc.

Thanks also to agraham & monster67!
Harald
 
Last edited:
Upvote 0
Top