Android Question file name using ContentChooser

Claude Brun

Active Member
Licensed User
Longtime User
My app needs to copy an external file (phone download directory ) to the DIR.Defaultexternal
To do this I use ContentChooser
On the phone filename is "Flag_xxx.jpg"
on result of Content.chooser, filename is "content://com.android.providers.downloads.documents/document/19"
The contents of the file are good and I can use it correctly if I force a filename in file.copy

But how to find the original filename
 

Claude Brun

Active Member
Licensed User
Longtime User
I found the solution in this post

https://www.b4x.com/android/forum/threads/getting-file-name-and-other-info-from-content-chooser-uri-–-example.116385/
 
Upvote 0
Top