how do i get multiple files, and resolve the file paths

RichyK68

Active Member
Licensed User
Longtime User
Hi all, I'm new to Basic4Android (but not to programming itself). I am writing an application that needs to request from the user one or more images. I am currently using the ContentChooser with the Mime type of "image/*" but this only lets the user return one. How do I return more than one?

Also, this returns the Dir and Filename, but this isn't the actual path to the file, which I require for renaming purposes. It currently returns information in the format:

content://media/external/images/media/36440

I can load the image from the above information but I need to be able to access the actual file for renaming and other purposes. What do I need to do to resolve the actual file path?

Thanks in advance,

Richard
 

RichyK68

Active Member
Licensed User
Longtime User
Hi, and thanks for the links, but I cannot see anything that would help me resolve the path. I use the contentchooser to select a JPG from my external SD card with, say, a filename of test.jpg but the Dir and Filename the chooser returns to me does not reflect the path to and including the test.jpg name, it only returns something along the lines of

content://media/external/images/media/36440

which is no use if I want to rename the selected file.

How can I get Android to resolve the contentchooser information it gave me to give me the correct path and filename of the selected file? Or should I not be using contentchooser in the first place?

Cheers,

Richard
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…