myandport wrote:Hi all,
I m a beginner in this field and i want to develop an application called a File Browser. In this application i want to implement features like browsing up the contents of sd card. I m tryuong it from many dayz but couldn't get the right way to do that. So any one please help me out for the same. I m using an emulator with android sdk version 1.1.
Thanks a lot in advance
Check out the java.io.File class :
http://developer.android.com/reference/ ... /File.htmlYou create a File object on a path
File(String path)
and then use the File methods for browsing the content.
For the card path it is best to use
Environment.getExternalStorageDirectory() and you get a File reference directly.
See
http://developer.android.com/reference/ ... nment.htmlSome generic Java File example code here:
http://www.exampledepot.com/egs/java.io/GetFiles.htmlDuring debugging you can use printout traces
System.out.println("string);
and watch the output of your app by redirecting stdout printouts to the log.
See
http://developer.android.com/guide/deve ... s/adb.html