Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.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-Intent.setType()参数_Android_File_Android Intent_Sms - Fatal编程技术网

Android-Intent.setType()参数

Android-Intent.setType()参数,android,file,android-intent,sms,Android,File,Android Intent,Sms,有人知道此方法的所有可用参数吗?喜欢图片/。。。还是文件/。。。?我在官方文件中找不到关于这个名单的线索 特别是,我需要发送contact.vcf文件的意图。但键入file/vcf不会显示“通过sms发送”选项 sendIntent.setData(Uri.parse("sms:")) 也没用 谢谢Intent.setType MIME类型是Intent.setType MIME类型是那么Intent.setAction呢?例如发送短信: intent.setAction(Intent.ACT

有人知道此方法的所有可用参数吗?喜欢图片/。。。还是文件/。。。?我在官方文件中找不到关于这个名单的线索

特别是,我需要发送contact.vcf文件的意图。但键入file/vcf不会显示“通过sms发送”选项

sendIntent.setData(Uri.parse("sms:"))
也没用

谢谢Intent.setType

MIME类型是Intent.setType

MIME类型是

那么Intent.setAction呢?例如发送短信:

intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("sms:" + phonenumberhere));
在本例中,Action视图是一种通用处理程序,但当与phonenumber和sms结合使用时,它将发送文本

Intent.setAction怎么样?例如发送短信:

intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("sms:" + phonenumberhere));

在本例中,Action视图是一种通用处理程序,但当与phonenumber和sms结合使用时,它将发送文本

非常接近,但当我尝试使用vCard发送彩信时,出现了nullpointerexception,代码如下:Intent sendIntent=new intentint.ACTION\u send\u MULTIPLE;sendIntent.putExtraIntent.EXTRA_流,Uri.fromFileoutputFile;sendIntent.setTypetext/vcard;非常接近,但当我尝试使用vCard发送彩信时,出现了nullpointerexception,代码如下:Intent sendIntent=new intentint.ACTION\u send\u MULTIPLE;sendIntent.putExtraIntent.EXTRA_流,Uri.fromFileoutputFile;sendIntent.setTypetext/vcard;