title: Android: Getting file name from camera?
body: <p>I ran into an issue with something that I am probably just overlooking.</p>
  
  <p>I want to take a picture from the surface preview of the camera, and save it to the <code>sd_card</code>. This works ALMOST perfect. I assigned it a file name, but it does not use the <code>filename</code>. </p>
  
  <p>This is what I have been trying to do :</p>
  
  <pre><code>Button imagecapture = (Button) findViewById(R.id.imagecapture);
  imagecapture.setOnClickListener(new View.OnClickListener() {
      public void onClick(View view) {
          String filename = null;
          ImageCaptureCallback iccb = null;
  
          try {
              filename = timeStampFormat.format(new Date());
              ContentValues values = new ContentValues();
              values.put(Media.TITLE, filename);
              values.put(Media.DESCRIPTION, "Image capture by camera");
  
              Uri uri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, values);
              iccb = new ImageCaptureCallback(getContentResolver().openOutputStream(uri));
          } catch (Exception ex) {
              ex.printStackTrace();
              Log.e(getClass().getSimpleName(), ex.getMessage(), ex);
          }
          camera.takePicture(mShutterCallback, mPictureCallbackRaw, iccb);
          com.froogloid.android.gspot.Park.imageFileName = filename;
      }
  });
  </code></pre>
  
  <p>It won't use the filename (i.e. time/date stamp I ask it to.)</p>