Can Environment.getExternalStorageState() be not mounted on Android ICS? -
i have following code previous projects android 2.1-2.3 checks if sd card mounted , writable or not.
@override protected void onresume() { super.onresume(); checksdcard(); } private void checksdcard(){ string state = environment.getexternalstoragestate(); if (environment.media_mounted.equals(state)) { log.d(tag, "sd card mounted , writable."); } else if (environment.media_mounted_read_only.equals(state)) { log.d(tag, "sdcard mounted readonly"); } else { log.d(tag, "sdcard state: " + state); mwarningsdcarddialog = new alertdialog.builder(this) .settitle("warning") .setmessage(r.string.warning_sdcard_message) .setpositivebutton(getstring(android.r.string.ok), mwarningsdcarddialogclicllistener) .setcancelable(false) .create(); mwarningsdcarddialog.show(); } } now i'm working on projects launched on android ics devices. found android ics device cannot connected computer usb mass storage. question is: have old code sense now? sd card mounted , writable on android ics?
thank you.
yes, still makes sense. there devices (e.g. nexus s) allow usb mass storage mode ics , jb.
Comments
Post a Comment