A
A
antonyter2012-11-29 23:42:16
Android
antonyter, 2012-11-29 23:42:16

How to find out the path to an external SD card?

To find out where the application is installed and the path to the internal flash on the Galaxy Note 10.1, I use:

File fileRoot = activity.getFilesDir();	//"/data/data/com.SomeApp/files"							
File externalRoot = Environment.getExternalStorageDirectory();//"/mnt/sdcard"

Here are a couple more functions, respectively, the address of the root and data
File RootDirectory = Environment.getRootDirectory();//"/system"
File DataDirectory = Environment.getDataDirectory();//"/data"

But when I plug in the micro-SD, /mnt/extSdCard appears at the same level as /mnt/sdcard. How to get it programmatically (in samsung galaxy tab 7.7 the paths are different)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
anmipo, 2012-11-30
@antonyter

Not a particularly aesthetic way, but the best one has not yet been found: stackoverflow.com/questions/5694933/find-an-external-sd-card-location/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question