Issue
the email intent code is completely run in the android mobile model provided by android studio but when I run the code in my personal phone its not work… please answer ??
Solution
Don't forget to set the type of intent so it will trigger email clients
Intent email = new Intent(Intent.ACTION_SEND);
email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to});
email.putExtra(Intent.EXTRA_SUBJECT, subject);
email.putExtra(Intent.EXTRA_TEXT, message);
//need this to prompts email client only
email.setType("message/rfc822");
startActivity(Intent.createChooser(email, "Choose an Email client :"));
Answered By - Saurabh Dhage
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.