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. How to kill the daemon?

Hi All,

Inside test_daemon (like PPP daemon), I'm starting another program by
calling following code.

system("/system/bin/test_prog  input1, input2&");

By doing this, test_prog starts well and it works but I do not know
how to kill the test_prog from this test_daemon.

Is there any simple way to kill test_prog inside test_daemon?

Or is there any better way to start/stop the program inside daemon?
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

2. Error installing ADT 0.9

I'm using Win XP and I'm trying to install ADT 0.9 for Eclipse (In
order to try SDK 1.5). I downloaded the ADT-0.9_pre.zip file and
everything. I follow the steps provided there:
http://developer.android.com/sdk/preview/

When I add the site, I choose "Archive" and browse to the file. When I
press OK, it get this error:
"No repository found at jar:file:C:\ADT-0.9_pre.zip!/"

Also, I noticed that my remote site (https://dl-ssl.google.com/android/
eclipse/) doesn't work anymore. To make it work, I need to use http
instead of https.

Anyone encountered this issue installing the new ADT? If it's because
of my firewall or something of the sort, I don't have access to it
(I'm living in my university's residences, and the network
infrastructure is provided by them).

Thank you.

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

3. Screen lock turns of the accelerometer.

4. Ways To Monetize Free Android Application

5. Anti-SMSishing discussio

6. People uploading our applications on Android Market without our agreement

7. AutoCompleteTextView and Theme.Light