Target effect:First in the simulator casually add two contacts, run the program, and then open the contact, found more contacts "Zhang San", and the log output three to Anxi person's name and mobile phone number and number type. (Run multiple times, so the ID inserted is not 3)The 1.activity_main.xml page is temporarily unavailable, so there is no need to change
If you want to import contacts from your phone into your SIM card, you can follow these steps:1. Click the "Application" button to return to the table in the middle of the cell phone.2. There will be many icons in the open application we find "contact". 3. After entering the contact, press the "menu" button below the phone
The main thing is to use content parser to deal with the problem:First, you should understand the Android phone contact database: Read the main use of 3 tables:
Table Name
Role
Contacts
Record Contact ID, (there are a few columns that indicate several contacts).
Mimetypes
Storage type alignment (in orde
distinguish which is the contact, which is the phone numberUri Rawcontactsuri =Uri. Parse ("Content://com.android.contacts/raw_contacts"); Uri Datauri= Uri.parse ("Content://com.android.contacts/data"); ArrayListNewArraylist(); //read the contact's ID from raw_contacts ("contact_id")Cursor Rawcontactscursor =getcontentresolver (). Query (Rawcontactsuri,NewString[] {"contact_id"},NULL,NULL,NULL); if(Rawcontactscursor! =NULL) { while(Rawcon
Windows Phone SDK 7.1 provides an API for obtaining contact list information. Although it is read-only, it is quite good than SDK 7.0. The related APIs for obtaining Contact information are located in the Microsoft. Phone. UserData space. Two main types are used for obtaining Contact information: Contacts and Contact. The following are examples of getting contact
Use of Android open-source class library Pinyin4j ---- search contacts
Pinyin4j can only be regarded as a Java open source class library, but it is also frequently used in Android application development. You have used mobile phone address book and address book to search for contac
,2.class);Startactivityforresult (Intent, 0); Where the number 0 is the request code, in a moment will be used-Second Step-In 2.class:Intent Intent = new Intent ();Intent.putextra ("key", value);Setresult (0,intent); Where the number 0 is the return code, in a moment will be used-Step Three-In 1.class:Overriding the parent class method: Onactivityresult/**requestCode 为请求码*resultCode 为返回码*data为2.class传回来的Intent*/protectedvoidonActivityResult(intint resultCode, Intent data) { super.onAct
Android 2.0 and later versions have made significant changes to contacts and other related APIs. Therefore, it is not recommended to port operations on Android 1.6 to Android 2.0. Here is a simple description of the operation method in SDK1.6.Do not forgetAndroidManifest. xmlAdd the permission to read contacts
The following code is used:
Public class Activity01 extends ListActivity
{
Public
(1) Contact person (Manifest get permission)1) Get ContactsThere are two ways to get a contactA. ContactpickerContactpicker is the direct opening of a system to select the contact interface, let the user choose, you can set a single or multiple selection:varContactpicker =NewContactpicker (); ContactPicker.DesiredFieldsWithContactFieldType.Add (contactfieldtype.phonenumber);//Windows.ApplicationModel.Contacts.Contact contact = await contactpicker.pickcontactsasync ();Windows.ApplicationModel.Con
1. To back up your contacts I'll go back to my mobile desktop and then click on the "Contacts" icon.2. In the contact us click on the three-point box, such as the Red Box "menu."3. Then we click on the three point after the pop-up menu, here we click on the Drop-down menu "set."4. Okay, let's get into the setup. We find "contact" and click on Enter, as shown in the following figure.
5. OK here we wi
The contact database of the Android system is very complex, not a simple table can be done.To simply query the user name and phone number, first to query the name, and then enter the name of the phone number, a name may correspond to multiple phone numbers: These is the Contacts rows that we'll retrieve. Static fina
1. In the mobile phone we find the "contact" icon, click to enter.
2. Then we then click on the "menu"-"Contact person to display" as shown in the following figure.
3. Finally, we just click on "All Contacts", as shown in the following figure will show all the contacts.
When you are done, you can display all of your co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.