I am trying to send an image taken from Glass with below code...
Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {
"xyz@gmail.com" });
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "My image attached");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageLocation));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
But I am getting "No apps can perform this action". I believe that there is no such intent in Glass. Can anyone provide the alternate solution, so that I can send email through Glass.
Mark Scheel
Without an email intent on Glass you will have to do it in a more raw way, there are instructions in this answer for doing so, including emails with an attached image, note the part about internet permission:
Sending Email in Android using JavaMail API without using the default/built-in app
来源:https://stackoverflow.com/questions/23358617/how-to-send-email-via-glass