Adham
Adham

Reputation: 64904

How to browse files stored on android SD memory?

I want to be able to browse the files using android application and get the path of selected files. How can i do that ??

Upvotes: 1

Views: 12543

Answers (4)

GSree
GSree

Reputation: 2898

You can use DDMS to browse the files inside Android application.

Upvotes: 0

asaad399
asaad399

Reputation: 31

Use standard java classes as File.listFiles();. View the files any way you like in an activity - in a ListView for example. You may also need the method from the Environment class.

Upvotes: 1

Barmaley
Barmaley

Reputation: 16363

Basically there are 2 options how to do it:

  1. Write your own Activity which will do browsing task - it's not very difficult. You'd need to fetch ListView with file list returned by File.listFiles();
  2. Use any Intent which supports File browsing/managing - simply by calling those Intent. E.g. like this one

Upvotes: 0

JasCav
JasCav

Reputation: 34652

You should read this section on Data Storage in the Android Developer APIs. Lots of good information here on how you access the SD card. Browsing it would be an extension of accessing the card's data. (Get a listing of the files on the SD card, and then display them to the user.)

Upvotes: 2

Related Questions