2017-11-06 13 views
0

내 응용 프로그램과 전화 번호부를 vcard 형식으로 공유하고 싶습니다. 공유 vcard 형식의 연락처 정보를 얻는 방법?vcard를 텍스트로 변환하는 방법?

Uri streamExtra = sharedIntent.getParcelableExtra(Intent.EXTRA_STREAM); 

**Result:** content://com.android.contacts/contacts/as_vcard/profile 
+1

가 https://stackoverflow.com/questions을이 모양이 확인할 수 있습니다/12659323/android-get-vcard-data-from-int –

+0

고맙습니다. 귀하의 링크는 독서 uri를 제공합니다. – gruLella

답변

0

this library을 사용하면 VCard를 구문 분석하고 정보를 추출 할 수 있습니다.

이 작업을 수행하는 방법의 예 : 다른 응용 프로그램과의 접촉 정보를 공유해야하는 경우

VCard vcard = Ezvcard.parse(str).first(); 
String fullName = vcard.getFormattedName().getValue(); 
String lastName = vcard.getStructuredName().getFamily(); 

, 당신은 this answer

+0

thanxx이 라이브러리를 사용하여 실행했습니다. – gruLella