*// Get the URI of a piece of media to attach. *
*Uri attached_Uri = Uri.parse(content://media/external/images/media/1); *
*
*
*// Create a new MMS intent *
*Intent mmsIntent = new Intent( Intent.ACTION_SEND, attached_Uri); *
*mmsIntent.putExtra(sms_body, Please see the attached image); *
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 hasitharand...@gmail.com wrote:
hi sean,
when i try to send a
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
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
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
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:14
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 =
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:
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
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
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
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
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 hasitharand...@gmail.com wrote:
hi guys,
According to the site this is the code
Intent sendIntent = new Intent(Intent.ACTION_SEND);
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
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
Anyone know it ?
On Jul 12, 10:03 pm, Jimmy Huang huan...@gmail.com wrote:
Does anyone can help me ?
Thanks
Jimmy
On Jul 10, 10:38 pm, Jimmy Huang huan...@gmail.com wrote:
Thanks John,
Does I only import thisMMSgit to my application, I can have my
application sendMMSprobably?
Does anyone can help me ?
Thanks
Jimmy
On Jul 10, 10:38 pm, Jimmy Huang huan...@gmail.com wrote:
Thanks John,
Does I only import thisMMSgit to my application, I can have my
application sendMMSprobably? please give me tips. thanks very much!
Regards,
Jimmy
On Jul 10, 7:47 pm, john
You could send it programatically but you would probably need to look
deep within the messaging application code.
Start here -
http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=tree;h=refs/heads/master;hb=master
good luck!
On 7月10日, 上午9時47分, Jimmy Huang huan...@gmail.com
Thank Yusuf. Yes, I known this, but it will open up the messaging page
to ask user to select the receipient and send. I will like to send
MMS directly from my application, don't need to popup the window
request the receipient, any idea?
Thanks,
Jimmy
On Jul 10, 8:47 am, Yusuf T. Mobile
19 matches
Mail list logo