I gave a Galaxy Nexus running 4.04 version of Android. I am trying to save 
a photo from my App so it can be viewed in the gallery. How can I do this? 
The code below writes to the log that the photo is saved, but I cannot see 
it on the device when I search for it.

PictureCallback jpegCallback = new PictureCallback() { 
    public void onPictureTaken(byte[] data, Camera camera) {
      FileOutputStream outStream = null;
      try {
        // Write to SD Card
      
        outStream = new FileOutputStream(String.format("myfile.jpg",
        System.currentTimeMillis())); 
        outStream.write(data);
        outStream.close();
        Log.d(TAG, "onPictureTaken - wrote bytes: " + data.length);
      } catch (FileNotFoundException e) { 
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      } finally {
      }
      Log.d(TAG, "onPictureTaken - jpeg");
    }
  };


-- 
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

Reply via email to