android-contacts

How can I get the default phone and SIM contact's ACCOUNT_TYPE and ACCOUNT_NAME?

不羁岁月 提交于 2021-02-17 04:45:05
问题 I want to get the default phone and SIM ACCOUNT_NAME and ACCOUNT_TYPE. On some devices, when I try to save a contact, it is not showing in the default Contact app of the device (like SONY or ASUS). It doesn't work when I try to pass null at ACCOUNT_NAME and ACCOUNT_TYPE, when saving the contact by bulk insertion. 回答1: Each device maker puts whatever it wants as the account type and name for the phone's phone-contacts, I've compiled a list for the major makers here: https://stackoverflow.com/a

How can I get the default phone and SIM contact's ACCOUNT_TYPE and ACCOUNT_NAME?

情到浓时终转凉″ 提交于 2021-02-17 04:44:23
问题 I want to get the default phone and SIM ACCOUNT_NAME and ACCOUNT_TYPE. On some devices, when I try to save a contact, it is not showing in the default Contact app of the device (like SONY or ASUS). It doesn't work when I try to pass null at ACCOUNT_NAME and ACCOUNT_TYPE, when saving the contact by bulk insertion. 回答1: Each device maker puts whatever it wants as the account type and name for the phone's phone-contacts, I've compiled a list for the major makers here: https://stackoverflow.com/a

How can I get the default phone and SIM contact's ACCOUNT_TYPE and ACCOUNT_NAME?

南楼画角 提交于 2021-02-17 04:44:15
问题 I want to get the default phone and SIM ACCOUNT_NAME and ACCOUNT_TYPE. On some devices, when I try to save a contact, it is not showing in the default Contact app of the device (like SONY or ASUS). It doesn't work when I try to pass null at ACCOUNT_NAME and ACCOUNT_TYPE, when saving the contact by bulk insertion. 回答1: Each device maker puts whatever it wants as the account type and name for the phone's phone-contacts, I've compiled a list for the major makers here: https://stackoverflow.com/a

Android contacts aggregation process

不羁岁月 提交于 2021-02-08 02:57:26
问题 I'm unable to find detailed information about the aggregation process in Android's contacts. I'm aware of the ContactsContract.Contacts -> ContactsContract.RawContacts -> ContactsContract.Data structure (as described on http://developer.android.com/guide/topics/providers/contacts-provider.html), and that a Contact consists of Raw Contacts , which are grouped together through one Contact_ID . What I specifically want to know is: under what circumstances are Raw Contacts grouped into one

Custom ContactsDirectoryProvider is not called for some operations

无人久伴 提交于 2021-02-07 05:18:07
问题 I've implemented custom ContactsDirectoryProvider which works fine when Contacts or Dialer applications are searching for contacts using URIs of the form content://com.android.contacts/data/phones/filter However when InCallUI or CallLog are trying to retrieve contact info with URis content:/contacts/phone_lookup the query method of my provider is not called. Any advice please.... P.S. I did not implement separate sync provider maybe this is the problem? 回答1: A workaround that we are using is

Custom ContactsDirectoryProvider is not called for some operations

南楼画角 提交于 2021-02-07 05:11:40
问题 I've implemented custom ContactsDirectoryProvider which works fine when Contacts or Dialer applications are searching for contacts using URIs of the form content://com.android.contacts/data/phones/filter However when InCallUI or CallLog are trying to retrieve contact info with URis content:/contacts/phone_lookup the query method of my provider is not called. Any advice please.... P.S. I did not implement separate sync provider maybe this is the problem? 回答1: A workaround that we are using is

Custom ContactsDirectoryProvider is not called for some operations

风流意气都作罢 提交于 2021-02-07 05:11:19
问题 I've implemented custom ContactsDirectoryProvider which works fine when Contacts or Dialer applications are searching for contacts using URIs of the form content://com.android.contacts/data/phones/filter However when InCallUI or CallLog are trying to retrieve contact info with URis content:/contacts/phone_lookup the query method of my provider is not called. Any advice please.... P.S. I did not implement separate sync provider maybe this is the problem? 回答1: A workaround that we are using is

How to retrieve all contacts details from Content provider with single query?

痞子三分冷 提交于 2021-01-06 03:28:53
问题 I need to read the contacts from device. The fields I required are ID , Display Name , Phone Number (All types) Email id (All types) and 'photo'. For this right now I am doing like this. 1 : First I am reading all the id s from ContactsContract.Contacts.CONTENT_URI; as shown below Uri contactsUri = ContactsContract.Contacts.CONTENT_URI; // Querying the table ContactsContract.Contacts to retrieve all the contacts String[] projection = {ID}; Cursor contactsCursor = mContentResolver.query

How to retrieve all contacts details from Content provider with single query?

◇◆丶佛笑我妖孽 提交于 2021-01-06 03:27:30
问题 I need to read the contacts from device. The fields I required are ID , Display Name , Phone Number (All types) Email id (All types) and 'photo'. For this right now I am doing like this. 1 : First I am reading all the id s from ContactsContract.Contacts.CONTENT_URI; as shown below Uri contactsUri = ContactsContract.Contacts.CONTENT_URI; // Querying the table ContactsContract.Contacts to retrieve all the contacts String[] projection = {ID}; Cursor contactsCursor = mContentResolver.query