android - Unable to get file list from external storage directory in Droid -


i trying access external storage in android.

i want push images can use in application.

the code using follows:

file directory = new file(string.valueof(android.os.environment.getexternalstoragedirectory())  + file.separator + appconstant.photo_album); 

ps: photo_album defined "papu"

it returns /storage/emulated/0/papu

i cannot see path exists through ddms, file explorer condition true;

    if (directory.isdirectory()) { } 

anyways, assumed reading mnt/shell/emulated/0/papu

when try files through

file[] listfiles1 = directory.listfiles(); 

it not return files @ all.

how can push files when don't folder in ddms explorer ?

here how ddms looks like:

enter image description here

and code is:

file directory = new file(string.valueof(android.os.environment.getexternalstoragedirectory())                 + file.separator + appconstant.photo_album);          // check directory         if (directory.isdirectory()) {              file[] listfiles1 = directory.listfiles(); 


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -