I've just been looking for something like this myself... a timely topic. Please could you edit this code to show how I would send an image from the @drawable folder?
On Jun 9, 4:29 pm, Sean Hodges <seanhodge...@googlemail.com> wrote: > Mike, > > I can do a little more than that, I can give you a fully working unit > test with the phone number pre-populated in the From: field: > > package com.seanhodges.sandbox; > > import android.content.Intent; > import android.net.Uri; > import android.test.AndroidTestCase; > > public class SendAnMMS extends AndroidTestCase { > > public void testSendingAnMMS() throws Exception { > Intent intent = new Intent(Intent.ACTION_SEND); > intent.putExtra("address", "12345"); > intent.putExtra("sms_body", "See attached picture"); > > intent.putExtra(Intent.EXTRA_STREAM, > Uri.parse("content://media/external/images/thumbnails/0")); > intent.setType("image/png"); > > // This is added just so the AndroidTestCase launches the > activity > as expected, remove this line in your production code > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > getContext().startActivity(intent); > } > > } > > If the referenced image does not exist, you should get a warning > pop-up when the SMS app launches. > > On Wed, Jun 9, 2010 at 3:57 PM, mike <hasitharand...@gmail.com> wrote: > > Hi Sean, > > > didn't get it at all. can you give me an example?? > > > regards, > > Mike > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en