[android-developers] Re: How to send mms from my code

2010-06-14 Thread Neilz
Good call... Both Uri uri = Uri.parse("android.resource://com.package.android.test/ drawable/icon"); and... Uri uri = Uri.parse("android.resource://com.package.android.test/raw/ icon"); ...work fine with Gmail. But both throw an exception when I choose 'Messaging': Caused by: java.lang.NullPoi

Re: [android-developers] Re: How to send mms from my code

2010-06-14 Thread Sean Hodges
> This acutally works if I select gmail, although the image name gets > changed to the resource id. However if I choose 'Messaging' from the > intent chooser, it throws a null pointer. That's very odd. Have you tried the "package/type/name" format instead of "package/id"? Uri uri = Uri.parse("an

[android-developers] Re: How to send mms from my code

2010-06-14 Thread Neilz
Found one of the answers I needed on another old topic: An extra slash is needed: i.putExtra(Intent.EXTRA_STREAM,Uri.parse("file:///sdcard/DCIM/Camera/ picture.jpg")); This solves the problem of sending via gmail. I still can't work out how to send a drawable from the resources. On Jun 14, 12:1

[android-developers] Re: How to send mms from my code

2010-06-14 Thread Neilz
This whole functionality seems really inconsistent - I now remember that I've tried this before and given up. I tried this code: Intent i=new Intent(android.content.Intent.ACTION_SEND); i.setType("image/jpg"); i.putExtra(Intent.EXTRA_SUBJECT, "Neils Subject"); i.putExtra(Intent.EXTRA_TEXT, "Hello

Re: [android-developers] Re: How to send mms from my code

2010-06-14 Thread Sean Hodges
I'm not sure of the best way to do this; but my understanding of the mechanism is that the image is pulled from any given content provider URI, just so long as the data returned can be understood by BitmapFactory.decodeStream(). So a simple solution would be to create a new ContentProvider and pas

[android-developers] Re: How to send mms from my code

2010-06-14 Thread Neilz
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 wrote: > Mike, > > I can do a little more than that, I can give you a fully working unit > test wit

Re: [android-developers] Re: How to send mms from my code

2010-06-14 Thread Sean Hodges
That is because there are multiple apps on your phone that can handle the intent. See the documentation: http://developer.android.com/intl/fr/reference/android/content/Intent.html#ACTION_SEND On Mon, Jun 14, 2010 at 5:31 AM, mike wrote: > hi sean, > > when i try to send a mms using your code it

[android-developers] Re: How to send mms from my code

2010-06-13 Thread mike
hi sean, when i try to send a mms using your code it pop up a box to select a relevant application to send the message?? why is that 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 a

Re: [android-developers] Re: How to send mms from my code

2010-06-12 Thread Sean Hodges
Mike, In the way I described, you are correct. There may be some way of returning the success of the MMS delivery by using startActivityForResult() instead of startActivity(), but you will have to take a look at the SMS app source code to see what is available there. Regards, Sean On Sat, Jun 1

[android-developers] Re: How to send mms from my code

2010-06-12 Thread mike
hi Sean, thanks for your reply, but in this case it's not possible to get the status of the message isn't it?? 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@googlegro

Re: [android-developers] Re: How to send mms from my code

2010-06-09 Thread Sean Hodges
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 An

[android-developers] Re: How to send mms from my code

2010-06-09 Thread mike
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

Re: [android-developers] Re: How to send mms from my code

2010-06-09 Thread Sean Hodges
It opens the SMS app so you can enter the contact number, see my email earlier. On Wed, Jun 9, 2010 at 2:25 PM, mike wrote: > hi guys, > > According to the site this is the code > >        Intent sendIntent = new Intent(Intent.ACTION_SEND); >                        sendIntent.putExtra("sms_body"

[android-developers] Re: How to send mms from my code

2010-06-09 Thread mike
hi guys, According to the site this is the code Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra("sms_body", body); Log.d("MMS URI", mms_uri); mms_uri == content://media/external/images/thumbnails/0