Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow a user to select a folder on an SD card

Tags:

android

I'm looking for a way to allow a user to press a button to browse the contents of the SD card, and then select a folder, whose path will be returned to the application. Similar to how you pull up the "Browse..." dialog on Windows for installations.

like image 693
Kevin Coppock Avatar asked Aug 01 '10 23:08

Kevin Coppock


2 Answers

Okay, so what I ended up doing was just using a ListActivity with a ListView (choiceMode:simple_list_item_multiple_choice) where the user can check the folders they wish to use. Then I used a custom layout that placed a Submit button below the ListView, which the user can press to confirm the selection.

like image 80
Kevin Coppock Avatar answered Oct 20 '22 17:10

Kevin Coppock


There is nothing built into Android for it AFAIK. You can integrate something like OpenIntents File Manager, but that is a separate APK that users would need to install.

like image 33
CommonsWare Avatar answered Oct 20 '22 16:10

CommonsWare