Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to access the files on SD card through an app?

How to access the files on SD card through an app?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

How to access the files on SD card through an app?

Postby Abhijith » Thu Oct 08, 2009 1:57 pm

Hi,
I need to search for certain type of files (like .mp3) and populate the list of files present in that particular category from the SD card. Can anyone help me with this?

-Regards Abhi.
Abhijith
Freshman
Freshman
 
Posts: 2
Joined: Thu Oct 08, 2009 1:51 pm

Top

Postby ysamlan » Thu Oct 08, 2009 9:53 pm

Same as any other file access in Java, really. Quick example:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. File f = new File ("/sdcard/")
  3.  
  4. for (String filename: f.list()){
  5.  
  6.   Log.d("test", "Filename: "+filename);
  7.  
  8. }
  9.  
  10.  
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


The Android docs have everything you need.
ysamlan
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 08, 2009 9:29 pm
Location: Boston, MA, USA

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests