tags:

views:

65

answers:

3

Hi I am new to android. I need to list available files in device or SDCard in the android emulator 1.5.Thanks in advance.

+1  A: 

Use normal Java File IO operations(see class-documentation)

Here is the pseudo-code:

String pathToSdCard = Environment.getExternalStorageDirectory().getAbsolutePath();
new File(pathToSdCard ).list();
Samuh
A: 

If you don't want to implement it by your own and if you want a folder picker with a GUI (also with animations etc.) you could use this code snipplet:

http://www.anddev.org/viewtopic.php?p=36463

Roflcoptr
A: 

There is a terrific tutorial with sample code at: http://www.anddev.org/building_an_android_filebrowser_list-based_-t67.html

It's not the same one posted by Sebi. A few tweaks are necessary such as sorting by alphabetical order, but overall it's very useful and consists of one simple class which is very easily understandable and modifiable.

HXCaine