How to use built in email application to send email from my application?

by dilu » Fri, 12 Dec 2008 14:44:11 GMT


Sponsored Links
 Hi
I wanna to send email from my application .I want to use built in
email application to send  mail from my application.So, can any one
provide me some sample code or link for sending email  using built in
email application?Any advice on this topic is most welcome.
Please reply.I am waiting for u people to reply.
Thanks
dilu
--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Peli » Fri, 12 Dec 2008 18:26:50 GMT


  http://www.openintents.org/en/node/121 

Peli
www.openintents.org



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to use built in email application to send email from my application?

by blindfold » Fri, 12 Dec 2008 18:52:25 GMT


 Same with me. Basically all I want is to automatically compose an e-
mail with a subject line, recipient address and an image attachment,
and an e-mail app should then pop up with this automatically composed
message, to let the user decide whether to send, edit or discard the
message. My purpose is to let the user e-mail a camera snapshot for
remote OCR analysis. The OCR back-end is already fully functional,
linking to the WeOCR servers in Japan, and is platform-neutral on the
user side, that is, works with any platform (Windows, Symbian, ...),
but it is rather inconvenient for the user to manually compose the e-
mail and figure out which snapshot from what folder to attach.

Thanks

On Dec 12, 11:33am, "dileep singh" <discover.dile...@gmail.com>




--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Mark Murphy » Fri, 12 Dec 2008 20:20:18 GMT


 


Peli has saved our bacon yet again:

 http://www.openintents.org/en/node/121 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Available!

--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Peli » Fri, 12 Dec 2008 22:42:16 GMT


 > Do u have some sample code?

Use the scroll-bar of your browser!

paste it here:

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "email text");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
sendIntent.setType("message/rfc822");
startActivity(Intent.createChooser(sendIntent, "Title:"));

If you want to know more, it helps to read the documentation ;-)
 http://code.google.com/android/reference/android/content/Intent.html #ACTION_SEND

Peli

On Dec 12, 11:33am, "dileep singh" <discover.dile...@gmail.com>




--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by blindfold » Sat, 13 Dec 2008 03:17:38 GMT


 I'd love to see that one extra line in your example that shows how to
add an image file attachment with the image file stored on the SD
card. :-)




--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Peli » Sat, 13 Dec 2008 04:03:19 GMT


 Use the source, Luke!

OI File Manager (  http://www.openintents.org/en/node/159  ) can do
this, so there is a good chance that you will find enlightment
there :-)

 http://code.google.com/p/openintents/source/browse/trunk/FileManager/src/org/openintents/filemanager/FileManagerActivity.java 

It is actually 2 extra lines:

sendIntent.setType("audio/mp3");
sendIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3");

I've now posted this on the OI page as well: 
 http://www.openintents.org/en/node/121 

Peli
www.openintents.org




--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Peli » Sat, 13 Dec 2008 04:08:17 GMT


 > I'd love to see that one extra line in your example that shows how to

Oh, sorry, you said image.

sendIntent.setType("image/png");
sendIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/
mygirlfriend.png");

I'm sure the next question is how to have both, subject and
attachment, but I'll leave this as an exercise to the reader :-)

Peli


--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by blindfold » Sat, 13 Dec 2008 20:41:52 GMT


 Fabulous Peli! Thank you. I found the online documentation a bit
intimidating at first, but this example gives a great flying start.

Regards



--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Abraham Lincoln » Sun, 04 Jan 2009 08:11:08 GMT


 This doesn't seem to work for regular text file. I have tried giving
mime types of "*/*", "text/plain" etc.

Anyone knows how to attach text files using Gmail? Doesn't even work
from Gmail app.



--~--~---------~--~----~------------~-------~--~----~



How to use built in email application to send email from my application?

by Noam Wolf » Sun, 04 Jan 2009 08:19:54 GMT


 Is there a way to actually send the email without having the user
choose an email client and hitting send? (without using a network
connection and having a server do it on the back end)




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. displaying camera preview on my own

Hi all, I'm new to the Android platform. I've been digging around lots
of sample code, and haven't seen anything that does what I want.. I'd
like to create my own code path for getting the camera data from the
PreviewCallback, and then displaying it on my own SurfaceView, since
I'd like to do some image processing of my own before display.

Is there a best practice for calling startPreview() without having a
real SurfaceView to draw on, since I want to draw on my own? Does it
involve creating a hidden view? If I don't set the Holder view
previewDisplay(), I get a crash in ViewRoot.draw(), which makes sense
I guess since nothing is set.

Thanks!
Sean

--~--~---------~--~----~------------~-------~--~----~

2. Unsuccessful Install

Hi there,

I'm just getting started with android developing. I have a very
frustrating problem. I've worked with samples to do a number of
little .APKs a few different hello worlds. A slightly modded version
of lunar lander. Very basic stuff. They work great in the emulator,
and they seem to export just fine. But then things go south.

I've used my web server to download them over the air. I've transfered
them to the sd card and tried to install them with Apps Installer (by
modmyGphone) It doesn't seem to matter what I do. Every install fails
with the stupid check mark and the words "Unsuccessful Install."
Needless to say I'm very frustrated, I have no idea how to trouble
shoot this and move forward.

FYI I have Unknown Sources checked in my settings. And I've
successfully installed plenty of non market apps both over the air and
off the sd card.

Alright android geniuses thats where I'm at can you help me?

--~--~---------~--~----~------------~-------~--~----~

3. Installing Unicode fonts in Emulator

4. how to add add language to g1 phone or Displaying webpages the given language

5. Brazillian developer

6. Market: Application not in search result, but exists

7. Official Resource for Dynamic JVM Languages on Dalvik?