I don’t have an Android device to test this (yeah, i know. Android developer without an Android device) but i was wondering if in case there is either NO sdcard in the device, or the sdcard is full, when i need to store some data during the execution of my app, will it return an IOException? Or will it just store it automatically in the phone’s memory? OR what happens in this situation, and what are the best steps to pursue?
Share
you could check if the sd card is mounted or not
Is there a way to tell if the sdcard is mounted vs not installed at all?
EDIT:
you can check the availaible space in your phone (sdcard/internal)
How to Check available space on android device ? on SD card?
you might find this useful too.. An IOException IS thrown if you exceed the storage limit.
IOException is thrown when SDCard is full