contacts

Problem adding Contact with new API

倾然丶 夕夏残阳落幕 提交于 2019-12-10 10:43:05
问题 I am trying to add a new contact to my contact list using the new ContactContract API via my application. I have the following method based on the Contact Manager example on android dev. private static void addContactCore(Context context, String accountType, String accountName, String name, String phoneNumber, int phoneType) throws RemoteException, OperationApplicationException { ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>(); //Add contact type ops.add

ABAddressBookRequestAccessWithCompletion iOS 7 and semaphores

倖福魔咒の 提交于 2019-12-10 10:17:40
问题 this code has been posted before, and been used as well, from what i could gather. i'm in a situation where i need the code to NOT continue until i know if i have access to the contacts. on Xcode 5.0.2 and iOS 6, this works just fine. on iOS 7, it hangs forever, and then when i kill the app the dialog box comes up asking to allow access to the contacts. ABAddressBookRef addressBook = ABAddressBookCreate(); __block BOOL accessGranted = NO; if (ABAddressBookRequestAccessWithCompletion != NULL)

Can't access/read SIM phonebook in Nokia

為{幸葍}努か 提交于 2019-12-09 18:47:55
问题 am trying to access both the Phone's phonebook and SIM phonenook on Nokia 5130c-2 XpressMusic. The app runs without errors but it only returns the numbers from the phone's Phonebook. When I list the available phonebooks using this code String[] all_contact_lists=PIM.getInstance().listPIMLists(PIM.CONTACT_LIST); it gives me both the Phonebook and SIM card lists. i.e 1. Phone 2. SIM I have tried explicitly reading from the SIM card using this code but it still returns nothing(even though I have

iOS List of Contacts With Same App Installed

眉间皱痕 提交于 2019-12-09 13:54:18
问题 I'm looking for a way to create a list of contacts on iOS for people who have the same app installed. Maybe a way to sync Facebook contacts and send e-mail invitations to those contacts to install the app. The point is that I need some way to know which contacts on my phone have the app installed and I can't seem to find information on the different approaches to this. Are there any APIs to help me? Are there multiple approaches to this? Where do I even begin to do this? Creating a list of my

How to fetch GMail contacts in my iphone App

旧街凉风 提交于 2019-12-09 13:48:14
问题 I need to fetch Gmail contacts by providing a gmail username and password. Any frameworks, Api's, Sample codes.. I know about XMPPframework that can fetch gmail chat contacts. but i want contacts from gmail address book. Any help would be appreciated.. 回答1: I have used the Google Data Api Obj-C client (http://code.google.com/p/gdata-objectivec-client/). I have never used it for Contacts but it supports them. It may be a good starting point. 来源: https://stackoverflow.com/questions/4781643/how

How to display QuickContact card from widget

为君一笑 提交于 2019-12-09 13:13:39
问题 I have a widget that displays the picture of some of my contacts and I would like to display the QuickContact card when the user taps on one of the pictures. I know I should be using the method ContactsContract.QuickContact.showQuickContact(), but it requires a View or a Rect as one of the input parameters. My problem is that Widgets only have RemoteViews, so I'm no sure what to pass as the View or Rect parameter. Any ideas would be appreciated. 回答1: You can reference the badge in the XML I

Android手机通讯录项目开发--联系人数据库contacts2.db介绍

て烟熏妆下的殇ゞ 提交于 2019-12-09 12:32:17
项目描述:该项目为基于Android平台的手机通讯录,主要模块分为四个部分:联系人管理模块,通话记录管理模块,短信管理模块,系统设置模块。 系统结构图如下: 本项目启动时间:2014年5月28日 说明:本次开发项目的所有源码全部会分享给大家。开发此项目的目的有这几点:一、锻炼独立开发项目的能力,二、增加对Android开发的了解,三、熟悉Android通讯录机制。 闲话不多说,正式开始! 技术要点一:熟悉Android联系人数据库contacts2.db 1.获得联系人数据库contacts2.db文件 步骤一、打开Eclipse并且运行模拟器; 步骤二、调出文件浏览器File Explorer(从工具栏中依次打开Windows—>Show View -> Other -> Android - > File Explorer),如图所示: 步骤三、打开文件浏览器,并在此目录data->data->com.android.providers.contacts->databases下,找到数据库:contacts2.db,注意:如果是想导出真机上的contacts2.db数据库,真机必须是经过root以后才能导出,否则在data目录层就打不开。 步骤四、选中contacts2.db,并且在File Explorer的右上角,选择导出键,将contacts2.db数据库导入到电脑上。

Is there a simple way to check if an incoming caller is a contact in Android?

孤街醉人 提交于 2019-12-09 06:36:52
问题 When an Android phone receives a call it automatically checks if the call exists in its own contact database. I was wondering if there is a simple way to access that information. I have a PhoneStateListener that performs certain actions during a ringing state, and I want to check if the incoming caller is in the contacts list. Is there a way to do this without going through the Contacts ContentProvider ? 回答1: The phone app uses the contacts ContentProvider too; I'm not sure why you would want

Can I extend Androids Contacts database?

孤街醉人 提交于 2019-12-09 05:01:35
问题 I was wondering is it possible to extend the Android Contacts database? From here - http://d.android.com/reference/android/provider/ContactsContract.html It says: ContactsContract defines an extensible database of contact-related information Extensible would suggest to me that I can add in more data to the contacts application outside the normal values such as Name, number, email, work number, home number etc.. However the examples of this page - http://d.android.com/reference/android

Last time the contact was modified

霸气de小男生 提交于 2019-12-09 01:00:29
问题 is there a way to find out the last time a contact was modified? I can't seem to find a variable for it. The reason I'm asking is because I'd like to do a sync of the contacts to my web server and I don't feel like checking for each contact with a HTTP request if it needs updating. So I was thinking to check the date of the last update to the date of the last sync. 回答1: Didn't find a way to do this. I can store the last sync date, but no way of checking if the contact was updated since then.