I want to send email on the gmail account.
When i use this it prompts a dialog which asks to select type like facebook, gmail, yahooo…
Before this i am using intent chooser now i am using just intent in the following code.
It calls intent chooser for the first time.. but i want default selection is gmail account
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("image/jpeg");
intent.setType("application/octet-stream");
intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList);
intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
intent.putExtra(Intent.EXTRA_TEXT, emailText);
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+image_id));
startActivity(intent);
Try changing the
intent.setType("image/jpeg")andintent.setType("application/octet-stream")to the following:Hope it helps.