In android how can I get a list of all external memory installed
I am developing an android application and for creating an directory on sdcard I have used the method
File myMedia = new File(Environment.getExternalStorageDirectory(),"MySaveCellData");
But th开发者_如何学Cis is creating the directory MYSaveCellData in to the internal memory. However, this phone has a an internal memory of 8 GB and has a 16 GB external card.
In normal phones its creating directory on external disk.
Let me know the solution.
I am finding a way to get a list of all external drive installed on a android phone.
In normal phones its creating directory on external disk.
Not for all "normal phones". Some phones do not have "external disk" in the form of an SD card.
Let me know the solution.
There is no "solution". It is up to the device manufacturer to determine what is "external storage" for their device. If they choose to make it be on-board flash instead of an SD card, that is their choice.
I am finding a way to get a list of all external drive installed on a android phone.
Android has exactly one "external drive", referred to as "external storage". If a device manufacturer supports both an on-board flash area as "external storage" and a SD card, Android will not know about the SD card.
SDK developers should simply use external storage, as your code does.
精彩评论