Android Question FILE ACCESS

pazzokli

Active Member
Licensed User
Longtime User
Hi, I need to read and write a txt file
What is the best location to put the file and witch permission I've to manage? How?

thanks
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
If that is all that you want to do then use File.DirInternal. But I suspect that you have not told us everything.
 
Last edited:
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
If the text is only for use by the App I agree with Brian Dean. If you need the user to have access directly,. IE Something you can send to someone else Etc. have a look at Erel's B4X Text Editor example.

It provides the means to read/write to external memory. IE SD Card, Gdrive Etc. By pinching the code I have been able transfer files between DirInternal and the SD Card.

That I have been successful shows it is not that hard and Erel has made a great job of keeping it simple.

Regards Roger
 
Upvote 0

pazzokli

Active Member
Licensed User
Longtime User
Thank you to ALL for your answer and your TIME (in Italy we say "Time is money")
App ask some information to the user and store them in a text file, so for the user location is not important.
If I use File.DirInternal, dir is deleted if I remove APP?
 
Upvote 0
Top