I've been able to successfully save a snapshot as a JPEG that I take from the camera to my emulator in the "data/data/com.mypackage/files/" folder by doing the following:
Using java Syntax Highlighting
- FileOutputStream stream = openFileOutput( "camera_photo.jpg", MODE_WORLD_READABLE );
- Bitmap usrPic = BitmapFactory.decodeByteArray(data, 0, data.length);
- usrPic.compress(Bitmap.CompressFormat.JPEG, 100, stream);
- stream.flush();
- stream.close();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
However, when I plug my actual Droid device via USB into my computer and run the application, the file supposedly is written to disk however I can't find it anywhere. I'm using ASTRO file browser app to search the entire device but I can't find it anywhere. I have set the appropriate permissions in my AndroidManifest file by way of:
Using xml Syntax Highlighting
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Parsed in 0.000 seconds, using GeSHi 1.0.8.4
so I'm not really sure what is going on. I tried writing to the SDCard also by changing the filename above to "/sdcard/camera_image.jpg" however I get an exception that says "java.lang.IllegalArgumentException: File sdcard/traffic_life.jpg contains a path separator" both when I try to run on the emulator AND my actual Droid device. Does anyone know what is going on? Ideally I'd just like to write directly to the Sdcard with a folder of my app. I'm not sure how to do this. I've searched everywhere but have found no real solutions. Any help would be greatly appreciated.

