@Jay.. did you set the right permissions to access/write files? Make sure you do that or it wont work. Also, google (or search here) on how to access the sdcard. I forget off the top of my head.
@Kevin.. you can post it using HttpClient, and on the server side (assuming Java) use the apache FileUpload servlet to get it in, or use Jersey (RESTful api) and handle a POST in a method with @FilePathParam as a parameter to get the file. To post a file as multipart from android, you'll need to add a couple jar files. My current app is about 1.6MB due to the jar files.. don't think that is too big, but it's a small bit of functionality. I'd love to find a way to handle multipart using the built in HttpClient without having to use 3rd party jars. On Thu, Feb 10, 2011 at 3:32 AM, Jayanthi <[email protected]> wrote: > 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 > -- 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

