Android Question [ SOLVED ] How can I write a file from File.DirRootExternal to SDCard?

Javier Mateo

Member
Licensed User
Longtime User
Hello everybody.
I am very lost and blocked.
Many years ago I developed an app for commercial management.
I used a SQLite database and made the backups in the SDcard.
This works well in the kitkat versions but in higher versions I can not find how to do it.
First I would like to know how to get the correct path in the SDCard, and later how to record the file.
I have seen some examples in the forum but I did not find any solution.
I know I have to use inputstream and outputstream and the function File.Copy2 (in, out) but I do not know how to get the correct path from the File.DirRootExtermal to the External storage.
I know how use the runtime permisions, but I do not how made the backup copy.

Could you help me in that subject?

Thanks in advance.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top