Prasanth
Prasanth

Reputation: 507

Find path of storage in Android

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?

Upvotes: 1

Views: 12977

Answers (3)

Mohsen Bahman
Mohsen Bahman

Reputation: 1092

You can use :

File f = new File(Environment.getExternalStorageState());

Upvotes: -1

Krishnabhadra
Krishnabhadra

Reputation: 34265

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

Upvotes: 1

Yilmaz Guleryuz
Yilmaz Guleryuz

Reputation: 9745

What about this?

return Environment.getExternalStorageDirectory().toString() + "/Music";

Upvotes: 8

Related Questions