The application that am working has to access the files stored on a tablet in the internal storage folder. Can any one tell me how to get access to it?
Asked
Active
Viewed 1.3k times
3 Answers
8
What about this?
return Environment.getExternalStorageDirectory().toString() + "/Music";

Yilmaz Guleryuz
- 9,313
- 3
- 32
- 43
1
See internal storage section of android data storage document..
EDIT
I think you should use ContextWrapper..Personally I never tried this..
ContextWrapper cw = new ContextWrapper(context);
File directory = cw.getDir("your music folder name here", Context.MODE_PRIVATE);
please check directory is null or not before you use it..
EDIT
See this thread..this might help you

Community
- 1
- 1

Krishnabhadra
- 34,169
- 30
- 118
- 167
-
Hi actually i want to get the path of music folder in tablet device. not for my app internal folder – Prasanth Oct 20 '11 at 06:44
-1
You can use :
File f = new File(Environment.getExternalStorageState());

Mohsen Bahman
- 1,092
- 3
- 15
- 27
-
Why not simply using `File f = Environment.getExternalStorageDirectory()`? The fewer objects created, the better. – Pijusn Jan 16 '13 at 11:06