How to get folder ids

525 views Asked by At

I am searching through the folders inside the DCIM folder on the android device

how do I get the folder id's that they are in ?

for example, if I have Camera folder, Picasa folder and other folders

I need this folder's ID

how do I get it ?

1

There are 1 answers

1
ask On

I'm assuming you're using the File class from java.lang.Object to do this?

If so, you can get the file's name using getName() and the absolute path using getAbsolutePath().

For more info, check out http://android-er.blogspot.in/2012/07/example-of-file-explorer-in-android.html and http://docs.oracle.com/javase/7/docs/api/java/io/File.html