I am not able to pre fill the TO field in Email client to the "to" address mentioned in the extras here:
EmailImage.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent it = new Intent(Intent.ACTION_SEND_MULTIPLE);
it.putExtra(Intent.EXTRA_EMAIL, "[email protected]");
it.putExtra(Intent.EXTRA_SUBJECT, "Regarding Policy Info");
it.putExtra(Intent.EXTRA_TEXT, "When is my next Premium due");
//it.setType("text/plain");
it.setType("message/rfc822");
startActivity(it);
}
});
What is the problem?
Thanks
Sneha
You need to put the address in an array:
it.putExtra(Intent.EXTRA_EMAIL, new String[] {"[email protected]"});
See here.