How can I check if emails can be sent from my phone? - android

I have an app that will send an email from the server if the app user does not have their email set up on their phone. Otherwise it will be sent through the android device.
What methods are there to check if email is configured on the phone?
Thanks

Another way to let the user to decide to send the email is to just create and use an Email Intent. That way the user sees that you want to send an email, and can choose what email client sends the email.
Example:
startActivity(new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:to#gmail.com"));

Related

Tracking if email was sent in another app

I am developing an app where the user can share via email (GMail app) or sms. Both methods will launch an external app that will do the work.
Since I am implementing tracking analytics that will be triggered when the email/SMS is sent, my question is how to send back or detect the status of sent email from GMail to my app. I know that it may sound like a stupid question, but I was wondering if this is possible.
how to send back or detect the status of sent email from gmail to my app
There is no requirement for the user to send the email, let alone for any email app (Gmail or otherwise) to let you know if the email was sent.
If the email is being processed automatically on some server, the server could use GCM or similar techniques to send a message to the device and your app indicating that the email was received.

Email intent back to activity

Can anyone tell me how to redirect email intent's back button to activity where send mail button is present. I was succeeded to send mail from my android app by using email intent.But I want the flow to be exists only in my app without opening mail inbox. Can anyone help me?
If you want to send the email from your app you will have to implement IMAP or SMTP protocols in your application. There may be some third-party libraries available already
And if you're asking about behavior of the GMail app after it proceeds your intent, you can't alter it
Yes it is possible for that you have to build the Php backend(webservice) for sending email, in that you can put subject,recipient address and message with that webservice.

Store file/attachment in draft using Gmail?

like :
we can send an email with an attachment in android app by using Intent
So :
Is this possible to store attachment in draft using email through code ??
we can send an email with an attachment in android app by using Intent
No, you can ask the user to send an email with an attachment using an Intent. Whether the user actually follows through on that request is up to the user.
Is this possible to store attachment in draft using email through code ??
No. Not all email clients even have the concept of "store attachment in draft".
You can send email using intent through gmail but AFAIK you can not save email as draft programmatically. No email application's provide such functionality to save the email programmatically in draft.

obtain a callbacks of sending mail

I am developing an application that needs to send inside an ordinary email.
The mail must be sent with the account set up on your smartphone. Through Intent.ACTION_SEND sending the mail goes smoothly.
Is there a way to know if the email was sent and if the sending has been successful?
The mail must be sent with the account set up on your smartphone
You assume the existence of such an account, and this is not a valid assumption. Bear in mind that just because they may have a Google account (e.g., for use with the Play Store), they may not be using Gmail, and there is nothing forcing users to use their Android device for any other email.
Is there a way to know if the email was sent and if the sending has been successful?
No.
ACTION_SEND does not send email. ACTION_SEND lets the user share content of a specified MIME type. Whether the user chooses to send via email, who they send the email to, whether they change the content, whether they send the email at all, and so forth is up to the user, and your app is not informed of any of this.

How to extract recipients email id from email intent in android after user has sent mail using android app?

I have created an app which alows user to send mails. The message text is prefilled with data from the app. I would like to know the recipient email ids the user send the mail to. Is it possible for me to get back recipient email ids when user sends mail using email Intent.
Is it possible for me to get back recipient email ids when user sends mail using email Intent.
Fortunately, this is not possible, as this would be a significant privacy violation.

Categories

Resources