How to launch android email setup screen programmatically from my activity
Posted
by ganesh
on Stack Overflow
See other posts from Stack Overflow
or by ganesh
Published on 2010-04-14T10:55:14Z
Indexed on
2010/04/14
11:53 UTC
Read the original article
Hit count: 1065
hi,
I could send mail from my Activity when i have already configured with any email account in android ,but in case if have not configured ,is there any way to launch email setup screen from my Activity ,or at least check whether email account is setup before sending a email.
If i haven't set up my email account then the following code takes me to compose SMS/MMS,which i don't want ,Please give your suggestion.
Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.putExtra(Intent.EXTRA_EMAIL, "xxx.com"); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "..."); emailIntent.putExtra(Intent.EXTRA_TEXT,"..."); emailIntent.setType("text/plain"); startActivity(Intent.createChooser(emailIntent, "Send mail..."));
© Stack Overflow or respective owner