2012-05-16 2 views
2

누구나이 방법에 대해 사용 가능한 모든 인수를 알고 있습니까? "이미지/..."또는 "파일/..."처럼? 공식 문서에서 그 목록에 대한 단서를 찾지 못했습니다.Android - Intent.setType() arguments

특히 연락처 (.vcf) 파일을 보내려는 의도가 필요합니다. 그러나 "file/vcf"유형은 나를 통해 SMS 보내기 옵션을 표시하지 않습니다.

sendIntent.setData(Uri.parse("sms:")) 

또한

감사

답변

4

Intent.setType() takes the MIME type as an argument 도움이되지 않았다.

MIME 유형이 text/vcard

+0

그것은 아주 가까이,하지만 난 vCard를 여기 와 MMS를 보내려고하는 코드입니다있어 NullPointerException이 있습니다 의도 sendIntent = 새로운 의도 (Intent.ACTION_SEND_MULTIPLE를); sendIntent.putExtra (Intent.EXTRA_STREAM, Uri.fromFile (outputFile)); sendIntent.setType ("text/vcard"); – UnknownJoe

0

방법에 대한 Intent.setAction입니까? 예 SMS를 보낼 경우 :

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

Action View이 경우 일반 핸들러의 종류이지만, PHONENUMBER와 결합 할 때 텍스트를 보내드립니다 SMS를.

관련 문제