8

My app requires that the use manually copy a file from their PC to the SD card in a subdirectory that my app creates there (or I will look for it in the root directory). So far, so good (most people not having a problem except when they try to run my app while the phone is still connected and then ask why it tells them "SD card not mounted" :-) ).

Anyway, I'm wondering how the Samsung Galaxy phones work since my understanding is that they have an external AND internal SD card. My app currently calls "Environment.getExternalStorageDirectory()"; does this return the root of the EXTERNAL card?

Also, when the user mounts the device to their PC, what does it look like? Do they see two mounted drives, or only the external card as a drive, or something else?

gordonwd
  • 4,537
  • 9
  • 37
  • 53

2 Answers2

8

To supplement Andy's answer. My findings with the Samsung Galaxy Tab have been that:

Environment.getExternalStorageDirectory() also returns the internal memory "/sdcard/". However unlike the Galaxy S, the actual SD card appears at "/sdcard/external_sd/".

When mounted with an 'external' SD card, I can report two extra drives appear in Windows, one for the internal and one for the external sd card.

AJ87uk
  • 156
  • 1
  • 6
  • When the internal card is mounted on the PC, I wonder if, from the PC, you can see the sd/ or external_sd/ directory that also represents the external card. I would certainly hope that this isn't the case, as it could cause lots of confusion for the user! – gordonwd Nov 19 '10 at 14:33
  • when mounted you see two drives, one is the internal memory, and the other is the external sd. – AJ87uk Mar 16 '11 at 15:17
  • LAME ! "/external_sd/" here's more: http://developer.samsung.com/forum/board/thread/view.do?boardName=GeneralB&messageId=162934&messageNumber=1381&startId=zzzzz~&searchType=TITLE&searchText=sdcard – Howard Pautz May 01 '13 at 18:44
0

Interestingly enough, I'm using a samsung galaxy s at the moment without an external SD card, and using Environment.getExternalStorageDirectory(), returns me a location in the internal SD card (/sdcard/), which is fine. I think if you also had an external SD card as well, you'd have the option to use the folder /sdcard/sd/ to put things specifically in the external SD card. I guess you'll have to see if that sub folder exists to tell if you can put things in an external or if you just have internal. This post also discusses the point:

http://androidforums.com/samsung-galaxy-s/176109-internal-external-sd-card.html

Although it isn't specifically the question you asked, I think the answers to this question may also give you the information your looking for:

Programmitically accessing internal storage (not SD card) on Verizon HTC Droid Incredible (Android)

As regards to what the device looks like when it's mounted (i.e. the usb cable is connected and file copying is selected from notifications) and attached the PC, it shows as just the one extra drive, which is my internal SD card. I must admit, I couldn't say what would happen if the device also has an external SD card as I don't have one to try!

Hope this helps! :)

Andy.

Community
  • 1
  • 1
Andy
  • 2,977
  • 2
  • 39
  • 71
  • Good information -- thanks! It's mainly my customers who might get confused, so I'll have to add something to my documentation. – gordonwd Nov 19 '10 at 14:29