androidsd-card

Android. No SD card available


My friend is testing my application which uses the SD card to store some settings. He has a Samsung Galaxy S2 but he just told me that he hasn't got an SD card in his device. It seems that the device created a folder in the phone's memory which simulates the existence of an SD card and that is where all app files that used the Sdcard are stored.

Is this a feature available for all Android devices? Should I consider the fact that there is no SD card on a device or should I not bother? Not sure if I should check for SD card availability in my app or not.

P.S. I've just noticed that the same goes for the emulator if I don't specify memory for the SD card.


Solution

  • You definitely should check for sdcard availability. On some devices it might work (as you said), but on some not, and you could get a FileNotFoundException.
    So it's worth checking.