vcard

How to get android contacts in Vcard format using android native API

人盡茶涼 提交于 2019-12-22 18:43:03
问题 I am trying to read Android device contacts in VCard format using Android Api. i found one link for the same: Android contatcs vcard API and trying to write the same code but its not working, as I am not able to get the lookupkey: ContentResolver cr = getContentResolver(); Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); int num = cur.getCount(); // I get 2 , as there are two contacts String lookupKey = cur.getString(cur.getColumnIndex(Contacts.LOOKUP_KEY)

How to use method dataWithContacts in CNContactVCardSerialization?

久未见 提交于 2019-12-22 10:30:17
问题 I am trying get NSData object with the vCard representation of the contact. My code: let contactStore = CNContactStore() let fetchRequest = CNContactFetchRequest(keysToFetch: [CNContactGivenNameKey, CNContactFamilyNameKey]) var contacts = [CNContact]() var vcard = NSData() do{ try contactStore.enumerateContactsWithFetchRequest(fetchRequest) { (contact, status) -> Void in self.fetchRequest.unifyResults = true self.contacts.append(contact)} } catch { print("Error \(error)") } do { try vcard =

Parse vcard json C#

别说谁变了你拦得住时间么 提交于 2019-12-22 09:25:37
问题 I want to parse the vcard RFC 7095 using Json.NET : ["vcard", [ ["version", {}, "text", "4.0"], ["fn", {}, "text", "John Doe"], ["gender", {}, "text", "M"], ["categories", {}, "text", "computers", "cameras"], ... ] ] I try to do it using FormatTypeFormater but I cannot validate the json. 回答1: You can parse it using JavaScriptSerializer to a object[] , then work on it to build a better complex type: var js = new JavaScriptSerializer(); var o = (object[])js.Deserialize(@"[""vcard"", [ ["

Looking for a library for vCard generation and parsing in Objective-C, C, C++ (for iPhone) [closed]

帅比萌擦擦* 提交于 2019-12-21 06:25:34
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I would like to be able to parse a vCard from a string and produce a string representation for a vCard. 回答1: Check out this library, I'm not the creator but i've used and it works just fine. Just take a look in the comments as there is a error that needs fixing in the library. 来源: https://stackoverflow.com

How to create/ update/ retrieve user vCard using XMPPFramework and OpeFire on iOS

柔情痞子 提交于 2019-12-21 05:36:15
问题 As the title suggests,I am trying to create a vcard for my user and send it to the server, but it seems that it doesn't work, any ideas? i will much appreciate any help Here is my code together with the stream connect and authentication, I included thses part bacause there may also be something wrong with them, as I am a noob in working with xmpp framework, the iOS client thaI use is: https://github.com/robbiehanson/XMPPFramework the .h class code is: #import <UIKit/UIKit.h> #import

Sending an MMS with a vCard attachment on Android devices

喜你入骨 提交于 2019-12-21 05:24:09
问题 I'm trying to find a way to send a MMS message containing a vCard attachment . I thought this would be a fairly easy task, but I still haven't managed to come up with something that just works over a wide variety of Android phones. The first thing I tried was this : Define an intent showing a list of apps capable of sending the vCard Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/x-vcard"); i.putExtra(Intent.EXTRA_TEXT,"MMS with vCard"); i.putExtra(Intent.EXTRA_STREAM, Uri.parse

Read/Parse Data from vCard

陌路散爱 提交于 2019-12-21 02:46:12
问题 Is there any framework/library available in iOS SDK to read/parse data in vCard format? I am receiving data in a vcard format in a NSString and I have to parse it. Googled a lot, but couldn't find solution yet. BEGIN:VCARD VERSION:2.1 N:LastName;FirstName;MiddleName;Prefix;Sufix ADR;TYPE=HOME: postbox;street2;street1;city;state;zip;country BDAY:2010-08-19 END:VCARD 回答1: I did found some solutions for you... Have a look at the following links... 1) Want ready made sample code==>Click here 2)

Asmack not loading VCard

僤鯓⒐⒋嵵緔 提交于 2019-12-20 03:56:12
问题 I am using a binary release of Asmack (I will be building it as soon as I have some time as I had problems the first time I tried). I also set up my own ejabberd server. When I try to load some contact VCard the server returns the info but Asmack does not seem to like it (or fail to parse it). This is what I can see in debug mode: <iq from='user@domain' to='admin@domain/Smack' id='I17sI-4' type='result'> <vCard xmlns='vcard-temp' prodid='-//HandGen//NONSGML vGen v1.0//EN' version='2.0'> <FN

vCard .vcf file download browser support - godaddy [closed]

五迷三道 提交于 2019-12-18 13:38:43
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . I have a download vCard (.vcf) link on a site. It works locally but not online. Just opens file in browser without downloading. I would rather not have to zip it. Read around and found I need to put this: AddType text/x-vcard .vcf in a .htaccess file. but it's still not working. Am I missing

Saving VCard contact via intent

守給你的承諾、 提交于 2019-12-13 18:25:57
问题 I want to save a contact data which is in VCard format in user's contacts via sending intent. Is there any way to do it? NOTE : I don't want to save VCard data in a .vcf file and then give it's uri to ‍‍ intent like the code below. String scanned = "..." // contact in VCard format Intent i = new Intent(); i.setAction(android.content.Intent.ACTION_VIEW); File vcfFile = new File(getCacheDir(), "tmp.vcf"); try { FileOutputStream fos = new FileOutputStream(vcfFile); OutputStreamWriter osw = new