> Thank you Mark for your reply. > > Reg: Do not hardcode /sdcard. Use Environment. >> >> getExternalStoragePath() to get >> the path to the SD card. >> >> > 1. When I use the above method, I end up with the problem of device not > mounted, how can I overcome this on an Emulator.
That method works perfectly fine on the emulator. The problems you have reported in this thread are with a different method (getExternalStorageState()). Also: -- Never use + to concatenate paths together. Use the proper constructors on the File class for that. -- You do not need to call getAbsolutePath() on the result of Environment.getExternalStoragePath(). > 2. On the actual device, how can I determine the path? Can I use adb shell > to navigate through the device? Your code should use Environment.getExternalStoragePath(). You as a developer can use adb shell or DDMS' File Explorer to poke around and deduce the path. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- 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

