Call the Contacts Database in Android (froyo) to add, delete, modify, and query contacts and groups. The effect diagram and source code are provided.

Source: Internet
Author: User

Note: ThisProgramBased on froyo. The program contains some froyo built-in contacts source code. The project code is UTF-8, based on 2.2

Main content:

1. add, delete, modify, and query contacts:

Quickcontactbadge is used when all contacts are displayed;

When displaying the details of a contact, quickcontactbadge + checkbox (the pentagram) + listview is used.

You can set an avatar for editing and creating contacts, and add multiple types of phone, email, and other information. the type of information is the same as that of froyo contacts.

Ii. Group Function

You can add, delete, modify, and query groups;

You can move contacts to or from a group;

This program differs from other programs:

The addition, deletion, modification, and query functions are relatively complete.

The information that can be added when creating a contact is consistent with the built-in contacts.

Creating and editing the Contact Interface and grouping are the highlights of this program.

I believe that it will definitely help you understand Android contacts!

:

The following two figures are displayed: Go to the program page (the menu includes adding contacts and displaying all groups); the page after adding contacts (the Avatar uses quickcontactbadge)

Add contacts (add profile pictures, add multiple types of phone numbers, email addresses, etc., and click "green"+"OK)

To operate on contacts, you only need to press

Displays contact details (quickcontactbadge, checkbox, and listview are used)

Modify the contact information on the same page as the new contact.

Group operation:

Add, delete, modify, and query a group (you can edit or delete a group by long-clicking ):

Import and remove groups:

Source code link:

Http://pan.baidu.com/share/link? Consumer id = 3115 & UK = 2953765628

Hope to study and make progress together with those interested in contacts!

Happy New Year!

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.