2
我有工作的Android应用程序,允许用户通过标准的意向范例共享内容,但我的移植代码不适用于Kindle Fire。在下面的代码片段中,默认的Kindle电子邮件应用程序不会被识别为意图的处理程序。默认的Kindle电子邮件应用程序不在ACTION_SEND和ACTION_SEND的选择列表中ACTION_SENDTO
下面给我“没有应用程序可执行此操作”消息:
Intent intent = new Intent(android.content.Intent.ACTION_SENDTO);
String uriText;
uriText = "mailto:[email protected]";
Uri uri = Uri.parse(uriText);
intent.setData(uri);
startActivity(Intent.createChooser(intent, "Send email"));
而且我在下面其他的尝试,只是提出了Facebook和LastPass的作为,可以处理文本/平原上唯一的应用程序。
Intent intent2 = new Intent(android.content.Intent.ACTION_SEND);
intent2.putExtra(android.content.Intent.EXTRA_EMAIL, "[email protected]");
intent2.putExtra(android.content.Intent.EXTRA_SUBJECT, "Email subject");
intent2.putExtra(android.content.Intent.EXTRA_TEXT, "Email body text");
intent2.setType("text/plain");
startActivity(Intent.createChooser(intent2, "Send email"));
有什么想法?
感谢 迈克
关闭袖口,感觉就像Kindle Fire电子邮件应用程序不太好。如果您可以将[AppXplore](http://developer.sonyericsson.com/wportal/devworld/technology/android/analysis-tools/appxplore?cc=gb&lc=en)这样的工具加入到Fire中,则可以将其用于检查清单并查看他们有哪些过滤器。 – CommonsWare 2011-12-18 21:57:38
有趣的观察:我安装了K9邮件应用程序,然后运行上面的代码。现在这两种方法都会返回Kindle电子邮件应用程序和K9。在安装K9之前,我尝试过多次使用上面的代码,但用户错误听起来是可能的。 – Mike 2011-12-19 19:23:13
::将主题插入* Twilight Zone *此处:: – CommonsWare 2011-12-19 20:02:40