vcf

How can I send vcard/contacts/?vcf var SMS or MMS in Android?

女生的网名这么多〃 提交于 2019-12-04 12:50:00
I want to modify the Android source code that can send (contacts/vcard/.vcf file) by mms or SMS, the Android default way is through Bluetooth. I find a lot of ways, but it all doesn't work. I know the vcf format is like this: BEGIN:VCARD VERSION:2.1 N:;lybeen;;; FN:lybeen TEL;CELL; PREF:1-123-234-1234 TEL;CELL:000-111-1111 END:VCARD I send this string by SMS as plain message. Some Android phone can recoginse this as a contact, however most of the Android phone can not recoginse, but I don't know how to send the contacts by mms. Sahil Mahajan Mj though i think i am late in answering the

how to add .vcf file as attachment in application iphone

不问归期 提交于 2019-12-04 12:15:33
问题 In my app I want to add .vcf file as attachment in MFMailComposeViewController. 回答1: The documentation for MFMailComposeViewController shows that its addAttachmentData:mimeType:fileName: instance method is the way to go: - (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename The attachment is the actual vcf file loaded or transformed into NSData. The mimeType for a vcf is @"text/x-vcard" . The fileName is whatever you want to call it, though

Convert Shift_JIS format to UTF-8 format

我的未来我决定 提交于 2019-12-03 23:01:18
问题 I am trying to convert a Shift_JIS formatted file into UTF-8 format. For this, below is my approach: Read Shift_JIS file getBytes of each line and convert it to UTF-8 Create new file and write UTF-8 converted value to it Issue is that at step 2 conversion is not happening. I am using below code for converting Shift_JIS to UTF-8: InputStream inputStream = getContentResolver().openInputStream(uri); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); byte[] b = line

how to add .vcf file as attachment in application iphone

被刻印的时光 ゝ 提交于 2019-12-03 07:48:37
In my app I want to add .vcf file as attachment in MFMailComposeViewController. The documentation for MFMailComposeViewController shows that its addAttachmentData:mimeType:fileName: instance method is the way to go: - (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename The attachment is the actual vcf file loaded or transformed into NSData. The mimeType for a vcf is @"text/x-vcard" . The fileName is whatever you want to call it, though you should uses the .vcf extension to ensure that email programs will understand it. Use the below code to

How to import or insert contacts from .vcf file in Android programmatically?

喜夏-厌秋 提交于 2019-12-01 05:45:55
问题 I create .vcf file of all contacts in Android using below code. public static void getVCF() { final String vfile = "POContactsRestore.vcf"; Cursor phones = mContext.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, null); phones.moveToFirst(); for(int i =0;i<phones.getCount();i++) { String lookupKey = phones.getString(phones.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY)); Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT

Convert Shift_JIS format to UTF-8 format

一世执手 提交于 2019-12-01 01:45:41
I am trying to convert a Shift_JIS formatted file into UTF-8 format. For this, below is my approach: Read Shift_JIS file getBytes of each line and convert it to UTF-8 Create new file and write UTF-8 converted value to it Issue is that at step 2 conversion is not happening. I am using below code for converting Shift_JIS to UTF-8: InputStream inputStream = getContentResolver().openInputStream(uri); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); byte[] b = line.getBytes("Shift_JIS"); String value = new String(b, "UTF-8"); Please let me know if any other

Python Library to Generate VCF Files?

最后都变了- 提交于 2019-11-30 20:11:24
Know of any good libraries for this? I did some searches and didn't come across anything. Someone somewhere must have done this before, I hate to reinvent the wheel. I would look at: http://vobject.skyhouseconsulting.com/usage.html (look under "Usage examples") Very easy parsing and generation of both vCal and vCard. PyCoCuMa appears to have a VCF parser built into it, and it'll generate VCard output. You might have some luck with it. I played around with it a bit; it parsed some VCF files I have lying around without any problems. You'll most likely have to poke through the source to figure

Python Library to Generate VCF Files?

Deadly 提交于 2019-11-30 05:03:02
问题 Know of any good libraries for this? I did some searches and didn't come across anything. Someone somewhere must have done this before, I hate to reinvent the wheel. 回答1: I would look at: http://vobject.skyhouseconsulting.com/usage.html (look under "Usage examples") Very easy parsing and generation of both vCal and vCard. 回答2: PyCoCuMa appears to have a VCF parser built into it, and it'll generate VCard output. You might have some luck with it. I played around with it a bit; it parsed some

Android how to send multiple contacts are attached in single .vcf file and send to mail?

对着背影说爱祢 提交于 2019-11-28 09:22:12
In my application, a number of contacts are attached to single .vcf file and that file sent to mail, try to this one all contacts data display in log cat, but unable to send all data attached to single .vcf file? Anyone have an idea regarding this help me, please. here is my code public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); vCard = new ArrayList<String>(); Log.i("TAG one", "vfile" +vfile); vfile = "Contacts" + "_" + System.currentTimeMillis() + ".vcf"; /** * This Function For Vcard And here i take one Array List in Which i

How to get a vCard (.vcf file) into Android contacts from website

六眼飞鱼酱① 提交于 2019-11-28 06:59:36
I'm trying to add a vCard from a web link to the user's contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser. I have confirmed that the files is being transferred with MIME type text/v-card. This seems like it should be pretty simple to do. Any ideas? Bernd AFAIK Android doesn't support vCard files out of the Box at least not until 2.2. You could use the app vCardIO to read vcf files from your SD card and save to you contacts. So you have to save them on your SD card in the first place and import them afterwards. vCardIO is also