I’ve some files in this location data/data/com.android/file/... I’m having one listview and one button in my layout and am extends Activity only. How can i fetch those files from DDMS and display that by items. Anyone know this?
I’ve some files in this location data/data/com.android/file/… I’m having one listview and one button
Share
I’m going to assume that
com.androidis your package name. If that is the case, you access these files by doing the followingfileList() is an existing method for your activity so you don’t have to write it. This will return to you a list of all private files associated with your application because
/data/data/<package name>/files/...is where the application saves your private files.To populate the listView, I would follow the guide here: example
That tutorial explains exactly how to create a list view using a String array. So where you have the line
Substitute COUNTRIES with files.
Hope that helps out.