How to send email via Glass
Asked Answered
G

1

6

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[] {     
    "[email protected]" });
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.

Galactopoietic answered 29/4, 2014 at 7:45 Comment(1)
sendgrid.com/blog/google-glass-tutorial-sends-email-visually take a look at this..Selfidentity
B
0

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

Bulgarian answered 1/5, 2014 at 14:17 Comment(1)
Thanks Mark, but I don't want to mention user's id and password unlike doing with intent :(Galactopoietic

© 2022 - 2024 — McMap. All rights reserved.