mobile - Android development - test for SD card or assume it's there? -
my app require external storage (sd card) in order save user's data. i've searched high , low, can't find best practices this.
do i...
simply assume external storage present , skip adding checks , alerts? (assumption here external storage goes missing in rare cases, , it's not worth spending ton of time coding solution this. typical users don't ever remove sd cards, etc.)
check external storage mounted only when reading or writing it? (users may remove sd card @ time, app still work until comes time access data.)
add listener @ application level waits external storage notifications , displays modal alert app-wide? (this sounds ideal, overkill know.)
any insight appreciated.
you should check before using it. suggest #2; you're right, #3 seem overkill (i don't know if there listener that). google docs has say:
before work external storage, should call getexternalstoragestate() check whether media available. media might mounted computer, missing, read-only, or in other state.
Comments
Post a Comment