On Oct 19, 3:51 am, Chris <[email protected]> wrote: > Hi All > > Now I need some information about SD card storage. I know that the API > Environment.getExternalStorageDirectory() can return SD card path. But > if an Android phone have some no-removal SD card, how do I get this > storage information. I think the removalable SD and no-removalable > should be at different path. > > Thank you a lot > > Chris
I recently saw two threads about this issue. Samsung Captivate sdcard issues. http://groups.google.com/group/android-developers/browse_thread/thread/d9cfab4394a6c282/3cc34281bc47bbf4?lnk=gst&q=Samsung+Captivate#3cc34281bc47bbf4 AT&T Samsung Captivate > mExternalStorageAvailable == false; http://groups.google.com/group/android-developers/browse_thread/thread/a1adf7122a75a657/744cafd232cd66e2?lnk=gst&q=Samsung+Captivate#744cafd232cd66e2 I have the same issue with Galaxy S. Until now all Android devices I got have "mount" command available. I build a list of available volume parsing "mount" response. This is not perfect but cleaver than Android storage API. String cmd = "/system/bin/mount"; try { Runtime rt = Runtime.getRuntime(); Process ps = rt.exec(cmd); BufferedReader rd = new BufferedReader( new InputStreamReader(ps.getInputStream()) ); String rs; while ((rs = rd.readLine()) != null) { //check what you need! Log.i("MOUNT_CMD", rs); } rd.close(); ps.waitFor(); } catch(Exception e) { } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

