I need to provide feature for users where users can share some data by sending email. I used below code.
Intent emailIntent = new Intent(android.content.Inte
You can use the ACTION_SENTTO instead of ACTION_SEND to get the list of e-mail clients. I tried this on HTC Wildfire which had default e-mail client, GMail app and k9-3.508-release installed. When I ran your code with ACTION_SENDTO, I got list of above mentions 3 e-mail clients and not bluetooth no matter if bluetooth was enabled or disabled. I tried it both when the bluetooth was enabled and when bluetooth was disabled. It worked well for me.
Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "testing email send.");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<b>this is html text in email body.</b>"));
startActivity(Intent.createChooser(emailIntent, "Email to Friend"));
Try adding the EXTRA_EMAIL to your intent, maybe bluetooth can be connected to ACTION_SEND but not to the same action if an email is to be send.
See here:
http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND
and here
http://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL
Just a rough guess ...
Try using this type instead:
emailIntent.setType("message/rfc822");