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.
Related
I make an application that allows users to send an email. when i use the usual procedure to send an email with intents the user is redirected to gmail app, and he can edit the mail. I would like to prevent the user from modifying the content of the email. would anyone know how to do it please?
This is too long for a comment, so I am posting the answer. The short answer is that if you rely on the user's phone as the email client, then there is no guaranteed way to prevent the user from editing the email message, because the Gmail app is out of your control. So, what you should instead do here is to use a server side webapp to send the message instead. As an example, I have used an email service (e.g. HawkHost) on the server side behind an Android app to send the message. With this setup, you can completely control what message gets sent from the user or on behalf of the user.
My app can send emails (Gmail) to other users.
The problem is that I'd like to let the user know that the email he just received is from my app.
I could do a notification service but I would prefer not as there are already tons of apps with running services and notifications.
Is there a way to catch the incoming of a gmail email with a certain label or subject or from address ?
I ask this because it looks so stupid to create another notification service when it's already there.
edit: added gmail-api tag
I am making a messaging application and we need to verify the user mobile number by sending short code through SMS from users mobile(user will be charged for outgoing SMS ).
We are able to send sms and even able to verify but the message is going from user's name so how to change this user's name to custom name as it is done in whatsapp or other application.
DW-Whatsapp
AM-Telegram
Please advice.
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.
Is this possible to somehow get notified whenever an email, for any email address, arrives on an Android phone (whether this account is using the default email application or any other email client)?
I am using the Java mail API.
Most probably you'll have to define a BroadcastReceiver listening for incoming emails.
Now, you should focus your investigation on discovering what Intent is fired when a new email arrives.
Note that this may be specific per application, and other mail clients may not send any Intents at all.