如何通过Glass发送电子邮件 [英] How to send email via Glass

查看:136
本文介绍了如何通过Glass发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下代码发送从Glass拍摄的图像...

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..."));

但是我收到没有应用程序可以执行此操作".我相信Glass并没有这样的意图.谁能提供替代解决方案,以便我可以通过Glass发送电子邮件.

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.

推荐答案

如果您没有在Glass上使用电子邮件的意图,则您将不得不以更原始的方式进行操作,此答案中包含有关这样做的说明,包括带有附件的电子邮件图片,请注意有关互联网许可的部分:

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:

发送使用JavaMail API在Android中发送电子邮件,而无需使用默认/内置应用

这篇关于如何通过Glass发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆