java - Trying to get a file path to a public folder on android device and get its content -


i looking file path of folder , content. folders public folder can access connecting device computer. how go getting file path access these public folders , content?

so once connect computer device these folders see , there 1 says "folder items from" , can't seem figure file path in order access content enter image description here.

this how i'm trying content , log them

    file fileofepubs = new file("/data/data/folder of items from/");       file[] direpub = fileofepubs.listfiles();      if (direpub.length != 0){         (int = 0; < direpub.length; i++){             string filename = direpub[i].tostring();             log.i("file", "file name = " + filename);         }     } 

you appear looking @ root of external storage. programmatically, access via environment.getexternalstoragedirectory(). requires either read_external_storage or write_external_storage permission.


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -