使用Intent.createChooser()的StartActivity(),而在Android的发送邮件的目的是什么 [英] What is the purpose of using Intent.createChooser() in StartActivity() while sending email in Android

查看:271
本文介绍了使用Intent.createChooser()的StartActivity(),而在Android的发送邮件的目的是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当以往任何时候都需要我们在Android中发送电子邮件,我们将使用Intent.ACTION_SEND象下面这样调用注册的电子邮件应用程序

When ever we need to send an email in Android we will invoke registered email application using Intent.ACTION_SEND like below

Intent i = new Intent(Intent.ACTION_SEND);
startActivity(Intent.createChooser(i, "Send mail..."));

我的疑问是,为什么我们需要使用startActivity使用Intent.createChooser而不是 startActivty(我)。 有没有使用任何特殊的理由 Intent.createChooser()

My doubt is why do we need to use Intent.createChooser in startActivity rather than using startActivty(i). Is there any specific reason of using Intent.createChooser()?

推荐答案

在选配使得选择另一个邮件应用程序而不是默认的用户。它如果使用正常的Gmail(隐私)和电子邮件(相关工作),你要选择采取哪一种非常有用的。

The chooser enables the user to pick another mail application than the default. Its very useful if you use normal gmail (privat) and email (work related) and you want to choose which one to take.

,一定要使用...

这篇关于使用Intent.createChooser()的StartActivity(),而在Android的发送邮件的目的是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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