I want to send some message to particular email ID. I set the to address and trying to send messages. it's working fine in Gmail App. but it's not working properly in the Mail App especially in Nexus 7(HTC one V also) what the reason behind?
Source Code
Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setType("text/html");
emailIntent.setData(Uri.parse("mailto:naresh.repalle@shoregrp.com"));
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Price Check Guru Feedback");
startActivity(Intent.createChooser(emailIntent, "Email:"));
Updated Code
Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO); emailIntent.setType("text/html");
//set the To address and Subject
try
{
String strSubject = URLEncoder.encode("Price Check Guru Feedback","UTF-8");
//testing
emailIntent.setData(Uri.parse("mailto:naresh.repalle@shoregrp.com"+ "?subject=" + strSubject));
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}
startActivity(Intent.createChooser(emailIntent, "Email:"));