contacts

how to fetch contact image and phone Number in my app using Objective C

岁酱吖の 提交于 2019-12-10 21:27:26
问题 I am getting the contact name from my phone. Check my code: - (void) fetchContacts { CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; if (status == CNAuthorizationStatusDenied || status == CNAuthorizationStatusDenied) { UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"This app previously was refused permissions to contacts; Please go to settings and grant permission to this app so it can use contacts"

Problem with TIMES_CONTACTED value in android contacts data

烂漫一生 提交于 2019-12-10 20:43:16
问题 I am writing an android activity that displays information about contacts (contact name, last time contacted, etc.) I am trying to show the number of times a contact is contacted using the ContactsContract.Contacts.TIMES_CONTACTED column but I always get a 0 value for all contacts. I am using a Samsung galaxy S device and I saw somewhere else on the Internet that this is a problem specific to some devices (including Samsung GS). Is there another way to get this information? Thanks 回答1: It

Date format : Android Contacts Birthday Anniversary

孤街浪徒 提交于 2019-12-10 19:23:37
问题 Working on Contact birthday and Anniversary: I get details and birthday like this 12.2.2012 or 12/2/2012 or 12-02-2012 or 2/12/12 Question: Is the date Format same across all Samsung Phones. IF yes what is the date format. (Guess won't work on all Android phones as birthday dates are stored in many different format) How to identify the date format like if the date is 12.2.2012 or Feb 12 2012 or any other date string pattern. Is it of format "yyyy-MM-dd" or "MMM dd, yyyy" or any other? ex: if

Get user/owner profile contact URI and user image with API 8 onwards

一曲冷凌霜 提交于 2019-12-10 18:44:20
问题 From API 14 (Android 4.0 onwards) onwards I can use ContactsContract.Profile.CONTENT_URI to get the phone owner's contact profile Uri, and through that obtain their avatar/contact photo. I want to know how to do this from API 8 (Android 2.2) through to API 13. I only need the photo (so it's okay if there is no concept of a user profile contact prior to API 14), although I'm by no means certain that it is actually possible. 回答1: Pre API 14, there is no concept of the user profile prior to API

Cordova-Plugin-Contacts can't remove contact field

本秂侑毒 提交于 2019-12-10 18:26:31
问题 I'm retrieving all contacts from the system like this: navigator.contacts.find(["*"], function (contacts) {}); And then I pick one contact from the array (e.g. var myContact = contacts[4]; ). The contact has two or more phone number fields. Shortened version of the contact's object: { phoneNumbers: [ {id: 0, type: "work", value: "123123123"}, {id: 1, type: "home", value: "3216532425"} ] } When I remove one of the both contact fields from the phoneNumbers array and then save the contact, it

How to get Outlook contact groups using MAPI?

旧街凉风 提交于 2019-12-10 17:02:09
问题 In Outlook 2010, you can create contacts and add them to groups. Is there any way to get the list of such groups and the contacts in them? Here's how I access the contacts: var outlook = new Outlook.Application().GetNamespace("MAPI"); var folder = outlook.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts); foreach (var curr in folder.Items.OfType<Outlook.ContactItem>()) { ... } I do not mean default contact folders, such as "Contacts" and "Suggested contacts". 回答1: The contact groups

Android: How to import contact from phone? [closed]

自古美人都是妖i 提交于 2019-12-10 16:17:13
问题 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 6 years ago . I am making a contact application. I wish to import all the contacts stored in the phone and sim cards into my application, but I don't know how to write the code. Any help and hints or links to useful answers would be very much appreciated. Thanks for spending your precious time to view this question. 回答1: You

how to combine both DISPLAY_NAME and NUMBER in a customized CursorAdapter?

喜欢而已 提交于 2019-12-10 15:57:30
问题 I want to load all of my contacts' names and phone numbers into an AutoCompleteTextView's adapter. How can I achieve that? for example, when i type "G", it will show "Good, <111111>", "Good, <222222>" in its drop-down list. with the api demo, i can only put the DISPLAY_NAMEs in the result cursor. I don't know how to combine both names and numbers into one cursor. thanks! codes from the api demo: ContentResolver content = getContentResolver(); Cursor cursor = content.query(ContactsContract

“Create New Contact” and “Add to Existing Contact” for CNContactViewController()

依然范特西╮ 提交于 2019-12-10 13:03:53
问题 With ABAddressBook, when I wanted the user to be able to have the options of "Create New Contact" and "Add to Existing Contact" for a contact they hadn't seen before, I would create and present an ABUnknownPersonViewController . I can find no way to replicate this functionality in the CNContacts framework. It seemed to me that CNContactViewController(forUnknownContact: contact) could work, but unfortunately this only lets the user "Send Message" or "Share Contact." How can I allow a user to

Show custom contact information

允我心安 提交于 2019-12-10 11:42:19
问题 So I have an MKMapView and I have a pin on it with a disclosure button. I want the user to be able to tap the disclosure button and the navigation controller to push a new view controller. But I want that new view controller to look like the contacts viewController that comes standard in the contacts app. I need it to display custom contact information because the contact will not be in the users contacts. I have been playing around with ABPerson, but I can't figure it out. I want that