Hi,

Thanks for the reply. i am using "uriTarget.toString()"  and
" Toast.makeText(AndroidCamera.this, "Image saved: " +
uriTarget.toString(), Toast.LENGTH_LONG).show();"
to get file path  following method is mentioned


public void onPictureTaken(byte[] arg0, Camera arg1) {
 // TODO Auto-generated method stub

 Uri uriTarget =
getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, new
ContentValues());

 OutputStream imageFileOS;
 try {
  imageFileOS = getContentResolver().openOutputStream(uriTarget);
  imageFileOS.write(arg0);
  imageFileOS.flush();
  imageFileOS.close();

  Toast.makeText(AndroidCamera.this,
    "Image saved: " + uriTarget.toString(),
    Toast.LENGTH_LONG).show();

 } catch (FileNotFoundException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 }
 String ImgUri = uriTarget.toString();

 Intent i = new Intent(AndroidCamera.this, ShowImage.class);

 i.putExtra("Image",ImgUri);
 startActivity(i);

}};






On Mar 31, 5:13 am, TreKing <[email protected]> wrote:
> On Tue, Mar 29, 2011 at 7:54 AM, sourabh <[email protected]> wrote:
> > String selectedFilePath = "content:/media/external/images/media/22";
>
> That is not a file path.
>
> --------------------------------------------------------------------------- 
> ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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