Android: launch android email with email id

Intent intent = new Intent(Intent.ACTION_SENDTO, 
Uri.parse("mailto:" + mEmail.getText().toString()));
intent.putExtra(Intent.EXTRA_EMAIL, mEmail.getText().toString());
startActivity(Intent.createChooser(intent, "Send Email"));

Comments

  1. Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("plain/text");
    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, "email");
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject string");
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "body");
    startActivity(Intent.createChooser(emailIntent, "chooser title"));

    ReplyDelete

Post a Comment

Popular posts from this blog

Working with Android Hierarchy Viewer

RecyclerView item animation

change svg android drawable color