How can I directly send an email using the default email application on the device

I have one of the questions of the type that usually makes me say "Why do you need this" and suggest that it will be used for malicious purposes, but here goes ...

How to send email without user interaction without using my own email sender?

Before any of you suggest this, I know Javamail , and I used this approach before it comes back to this, if I need to, I also know how to call the selection switch and how to open the layout screen directly . I do not want it.

I have a feedback form in my application. 3 text fields and buttons. When the user clicks the button, I send the data in the fields to myself, but to further increase the size of my application, I want to send mail through any mail application currently installed / by default, without further user interaction.

Is it possible?

+3
source share
6 answers

What you want to achieve is impossible with your conditions, however there is a great deal of choice that you must achieve in the same way in a cleaner way.

1.Use libraries and services like ACRA, as @Oliver noted.

2. API , , Google app engine, .

  1. , .

, .

+1

SMS :

SmsManager sms = SmsManager.getDefault();
String myPhoneNumber = "800 333-1212";
String toEmailAddress = "foo@foo.com";
String myEmailBody = "Here is my email message";
sms.sendTextMessage( toEmailAddress,"1"+myPhoneNumber, myEmailBody, null, null);

, , ... SEND_SMS . , , Wi-Fi .

+3

. Android , . Gmail , gmail, , . - hotmail, yahoo POP3/IMAP, . android.

+1

-, Android.

Android, -, .

2 -, .

+1

:

1) webservice , .

email data->server->mail to Specific user

2) java mail API . Android API JavaMail /

0

Android . Intent , , , .

I believe that Intens is the only reliable way to interact with the default email client. You cannot change the behavior of other applications, so you cannot do this conceptually.

You must either implement the mail client in your application, or simply handle the default behavior of the application.

-1
source

All Articles