tags:

views:

37

answers:

1

Hi,

I am new to Android and Java so pardon me if the question sounds stupid.

I have connected a device to PC which runs android OS. Once the device is attached I can see its direcotry F:\ .

How do I write a code in JAVA which can display me those files. I am using Eclipse IDE and Android plug in.

Thank you

A: 

Hi,

What you see as F:\ is most probably the content of device's micro SD card storage. To write an application that displays the names of the files, you must go trough the process of learning Android basics and modify some "Hello world" sample to do so. Keep in mind that if your PC sees the SD card contents, then you phone won't be able to see them at the same time.

ognian
Yes I have learned the basics of android and have also wrote hello world...how ever I am looking for a code spinet to access android external storage..
Ved
Then use Environment.getExternalStorageDirectory() to get the root directory of the external storage, and find on Google snippet for recursive traversing of files in Java
ognian