当我们需要在安卓系统中发送电子邮件时,我们将使用Intent.ACTION_SEND调用注册的电子邮件应用程序,如下所示
Intent i = new Intent(Intent.ACTION_SEND);
startActivity(Intent.createChooser(i, "Send mail..."));
我的疑问是为什么我们需要在startActivity中使用Intent.createChooser,而不是使用startActivty(i)
。使用Intent.createChooser()
有什么特别的原因吗?
https://stackoverflow.com/questions/3804233
复制相似问题