0

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?

micky
  • 508
  • 5
  • 17

2 Answers2

1

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

Anton
  • 4,395
  • 7
  • 32
  • 46
  • thanks for ur answer..I am using email intent that enable the user to type their message now I want the composer sheet back button returns to my activity rather than opening inbox – micky Mar 27 '14 at 06:45
  • That is not possible. It's up to that email activity to define what happens when user clicks the back button – Anton Mar 27 '14 at 06:49
  • what about startActivityForResult? – micky Mar 27 '14 at 06:56
  • startActivityForResult won't work, unfortunately (meaning that it won't return a result **after** sending, but **before** - so you can't pop up a message saying "eMail sent"). – Phantômaxx Mar 27 '14 at 08:33
-2

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.

Kishan Dhamat
  • 3,746
  • 2
  • 26
  • 36