vcard

Address book DB schema

丶灬走出姿态 提交于 2019-12-06 11:33:58
I need to store contact information for users. I want to present this data on the page as an hCard and downloadable as a vCard . I'd also like to be able to search the database by phone number, email, etc. What do you think is the best way to store this data? Since users could have multiple addresses, etc complete normalization would be a mess. I'm thinking about using XML, but I'm not familiar with querying XML db fields. Would I still be able to search for users by contact info? I'm using SQL Server 2005, if that matters. Consider two tables for People and their addresses: People (pid,

Send VCard file/string via Whatsapp or mail programmatically

巧了我就是萌 提交于 2019-12-06 10:09:54
I am trying to send a VCard from a String or file via Intents choosing the app, for example Whatsapp. Do you have any ideas? Thanks Edit: I have tried this code. Also with set type text/plain. The vcard variable is a String with a VCard. Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setType("text/x-vcard"); intent.putExtra(android.content.Intent.EXTRA_STREAM, vcard); intent.setPackage(packageName); If I send this to Whatsapp I got to send the vcard like a string but not recognize like a card Try using EXTRA_TEXT instead

How to retrieve vCard in iOS from XMPP/OpenFire

六月ゝ 毕业季﹏ 提交于 2019-12-06 09:11:28
As the name suggests I am trying to retrieve a vCard for a user using one of the next XMPPFrameworks methods: - (XMPPvCardTemp *)fetchvCardTempForJID:(XMPPJID *)jid; - (XMPPvCardTemp *)fetchvCardTempForJID:(XMPPJID *)jid useCache:(BOOL)useCache; My current implementation is: dispatch_queue_t queue = dispatch_queue_create("queue", DISPATCH_QUEUE_PRIORITY_DEFAULT); dispatch_async(queue, ^{ XMPPvCardCoreDataStorage* xmppvCardStorage = [XMPPvCardCoreDataStorage sharedInstance]; XMPPvCardTempModule* m = [[XMPPvCardTempModule alloc] initWithvCardStorage:xmppvCardStorage]; [m fetchvCardTempForJID:

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

懵懂的女人 提交于 2019-12-06 07:07:55
问题 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

How to use method dataWithContacts in CNContactVCardSerialization?

泄露秘密 提交于 2019-12-05 19:15:54
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 = CNContactVCardSerialization.dataWithContacts(contacts) } catch { print("Error \(error)") } But, i get

Parse vcard json C#

北城以北 提交于 2019-12-05 18:39:29
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. 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"", [ [""version"", {}, ""text"", ""4.0""], [""fn"", {}, ""text"", ""John Doe""], [""gender"", {}, ""text"", ""M""], ["

How to download a .vcf file correctly

自闭症网瘾萝莉.ら 提交于 2019-12-05 10:46:56
I'd like to know, how can I realise a Vcard download. That's my current code: $path = "../../media/resources/"; $file = "someName.vcf"; header('Content-Type: text/x-vCard'); header('Content-Disposition: attachment; filename= "'.$file.'"'); header('Content-Length: '.filesize($path.$file)); header('Connection: close'); readfile($path.$file); Unfortunately, it does only give out the content from the .vcf file. How can I give this vcard to the user as a download? You have header('Connection: close'); which I would imagine closes the connection before the contents of the file are read. I've removed

unable to create a person using VCard representation

不问归期 提交于 2019-12-05 05:17:10
问题 I am developing an app using XCode 4.2 and I am trying to create an ABPerson using initWithVCardRepresentation and/or ABPersonCreatePeopleInSourceWithVCardRepresentation , but I can t find a working example . can someone help? I get the VCard in an NSString format.... Thanks 回答1: This is a full example and it works perfectly, it bases on the latest iOS 8. First of all you should check authorization status and request access right if not, then save the vcard, let just review the code below: if

php vcard display as plain text

♀尐吖头ヾ 提交于 2019-12-04 23:13:47
i have a new feature on my site that allow user to get vcard files. this feature reads data from my database (which this one works) and generate the vcard. the file is: vcard.php and i pass the user id as GET then i get all the information using that id my problem is when i want to get the vcard, it display as text. here's a simplified version of my code: <?php class Vcard { public function __construct() { $this->props = array(); } public function setName($family, $first) { $name = $family . ';' . $first . ';'; $this->props['N'] = $name; if(!isset($this->props['FN'])) { $display = $first . ' '

Vcard parser with Python

白昼怎懂夜的黑 提交于 2019-12-04 14:26:00
问题 I am parsing my vcard info (copied to a txt file)to extract name:number and put it into a dictionary. Data sample: BEGIN:VCARD VERSION:2.1 N:MEO;Apoio;;; FN:Apoio MEO TEL;CELL;PREF:1696 TEL;CELL:162 00 END:VCARD BEGIN:VCARD VERSION:2.1 N:estrangeiro;Apoio MEO;no;; FN:Apoio MEO no estrangeiro TEL;CELL;PREF:+35196169000 END:VCARD import re file = open('Contacts.txt', 'r') contacts = dict() for line in file: name = re.findall('FN:(.*)', line) nm = ''.join(name) if len(nm) == 0: continue contacts