How to get Directory and file name of an image selected from gallery
问题 I need to use this function, java.io.File.File(File dir, String name) public File (File dir, String name) Added in API level 1 Constructs a new file using the specified directory and name. Parameters dir the directory where the file is stored. name the file's name. Throws NullPointerException if name is null. Now as we can see it needs file dir and name as parameters. Now I am selecting an Image from gallery by intent. How can I get the dir and name for the selected file.? Here is the snippet