Hi ,
I am getting this error :"ERROR/Mms/media(215):
java.io.FileNotFoundException: /sdcard/1297337002449.jpg (No such file
or directory)"

below is the path where I write the file

path = String.format("/sdcard/%d.jpg", System.currentTimeMillis());
        Log.e("Image","from Sdcard" + path);

        outStream = new FileOutputStream(path);
        outStream.write(data);
        outStream.close();
Am I wrong of storing image in SDcard

Thanks,

On Feb 9, 11:33 pm, Kevin Duffey <[email protected]> wrote:
> Email intent.. which you can use to bring up email app and attach photo to
> it, to/subject/etc lines
>
>             final Intent i = new Intent(Intent.ACTION_SEND);
>             i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>             i.setType("image/jpg");
>             i.putExtra(android.content.Intent.EXTRA_EMAIL,
>                     new String[] {"[email protected]" });
>             i.putExtra(android.content.Intent.EXTRA_SUBJECT,
>                     "Subject");
>             i.putExtra(android.content.Intent.EXTRA_TEXT,
>                     "Body of email here");
>
>             // attach saved photo from sdcard location
>             i.putExtra(Intent.EXTRA_STREAM,
> Uri.parse("file:///sdcard/data/photo.jpg"));
>             // pop up the email program for user to preview and send from
>             startActivity(i);
>
> As for your first issue, in your camera takepicture handler, you save the
> image to whever you want. That is the path you use in the Uri.parse() call
> above.
>
> On Tue, Feb 8, 2011 at 11:34 PM, Jayanthi <[email protected]> wrote:
> > Yes , I have seen loads of example but now I am trying this for
> > Samsung Galaxy Tab ,here my problem is I couldn't able to set Image
> > path to ImageButton
> > Thanks,
>
> > On Feb 9, 1:57 am, Joe McCann <[email protected]> wrote:
> > > Seriously, did you google it?  There are loads of examples.
>
> > > On Feb 8, 3:12 am, Jayanthi <[email protected]> wrote:
>
> > > > Hi,
> > > >     I am new to android I want to send mail with image attached to it
> > > > I need solution for two question
> > > > 1.How to get the path of image saved in sd card using camera preview
> > > > 2.How to send mail by attaching image
>
> > --
> > 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
>
>

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