I believe Mark is right, you need to unmount the SD card from your computer. You should still be able to debug and deploy applications on the device, you just can't have it in the mode where it looks like a drive on your machine for file browsing.
The example you are using leverages the built-in camera application which requires the SD card for saving the image. You can get around that issue by building a custom camera application. -s Shawn Van Every Author: <a href="http://apress.com/book/view/1430232676">Pro Android Media</a> On Dec 19, 5:24 am, Mark Murphy <[email protected]> wrote: > On Sun, Dec 19, 2010 at 1:29 AM, David Karr <[email protected]> > wrote: > > Sorry, I need more information. > > ? > > > You're saying that because I had the phone connected to my computer > > with the USB cable (so I could deploy the application to the device), > > that means that the SD card in the phone is mounted on the WinXP box, > > and so can't be used from the phone? > > No, I mean that if you mounted the SD card as a drive while connected > to USB, the SD card is unavailable to Android. > > > Is there something that should > > be done in the setup of the test on the phone so that I would unmount > > the SD card from the WinXP box, but still let me step through the code > > while it's running on the phone? > > Don't mount the drive in the first place. Or, unmount it the way you > would any other USB drive (e.g., icon in the task tray). > > > Calling Environment.getExternalStorageState() will tell me the > > "current state" of the SD card. How does that help me? > > App users sometimes mount their external storage (e.g., SD cards). > Apps, therefore, should not blindly write to external storage, but > should check the storage state first. > > Again, this is all based on an educated guess that your problem > stemmed from your having mounted your phone's external storage as a > drive in Windows. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 > Available! -- 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

