Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 意向选择器未显示所有可用选项(三星手机)-共享内容_Android_Android Intent_Samsung Mobile - Fatal编程技术网

Android 意向选择器未显示所有可用选项(三星手机)-共享内容

Android 意向选择器未显示所有可用选项(三星手机)-共享内容,android,android-intent,samsung-mobile,Android,Android Intent,Samsung Mobile,这是目的代码: Intent emailIntent = new Intent(); emailIntent.setAction(Intent.ACTION_SEND); emailIntent.putExtra(Intent.EXTRA_TEXT, text); emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject); emailIntent.setType("message/rfc822"); Intent openInChooser = In

这是目的代码:

Intent emailIntent = new Intent();
emailIntent.setAction(Intent.ACTION_SEND);
emailIntent.putExtra(Intent.EXTRA_TEXT, text);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.setType("message/rfc822");
Intent openInChooser = Intent.createChooser(emailIntent,resources.getString(R.string.app_name));
startActivity(openInChooser);

在三星手机中,选择器仅显示本机电子邮件应用程序,而不显示从play store安装的应用程序。我还需要添加其他内容吗?

您确定您安装的电子邮件应用程序支持此特定的
意图
结构吗?是的,我安装的其中一个应用程序是Outlook。在其他手机(Nexus、Oneplus)中,选择器显示该选项,但在三星手机中不显示该选项。您可以尝试调用
PackageManager
上的
QueryInputActivities()
,查看Outlook是否显示为候选活动。如果是这样,那么三星就拧上了系统选择器。是的,outlook应用程序显示在结果中。::耸耸肩::您可以尝试删除
createChooser()
,直接调用
emailIntent
,看看是否是手动请求的选择器出了问题。但除此之外,我不知道如何让三星停止从选择器中过滤Outlook。