In the Peopleactivity interface. The display location of the contact is determined by the first character of its display name.The contacts at the beginning of the number are displayed under the "#" header.The Chinese and English contacts will appear under "A" to "Z".Contacts that begin with a symbol do not have a corresponding header. is displayed at the top of t
The Address Book is a tool for Mac users to save contacts, but after we've saved a lot of contacts, how do we get those contacts out of the address Book? There must be some users who are not clear, so come to see the following method.
How to export contacts from an address book:
1. Open Address Book (in the Applica
Today's learning task: Read the main information (name and phone number) of all contacts on the mobile phone, and display it in listview
Main Content involved: 1) structure and usage of the contact API 2) role of the contentprovider component, Uri concept and usage 3) create a listview and bind data
1. Structure and usage of the contact API
Since Android 2.0 (API Level 5), the Android platform has adopted the improved
Abstract: Although I sometimes get bored with C # And this framework-based development model, or. net Framework is a bit difficult, but sometimes you have to lament how easy it makes our development. For example, the contacts who Access Windows Mobile.
Keywords
Poom, Windows Mobile, pocketoutlook, contacts,. NET Compact framework, C #, C ++
A friend asked about poom two days ago. In fact, some examples
*/*.
ReturnIf the user cancels the file pick, the {type: ' Cancel '} is returned.
Otherwise, return {type: ' Success ', uri,name,size} where the URI is the uri,name of the local document file is its name, and size is it in bytes.
Constacts
Provides access to the contact person of the opponent's machine system.
Expo.Contacts.getContactsAsync (Options)Gets a list of all the entries in the system contact. This returns a set of data related to the contact entry.
Parameters
Opt
Only excellent talents have excellent contacts
I once met a student at Peking University and asked me, "Teacher, do you say learning is important, or do you have business contacts ?" Looking at his face, I took out my notebook and noted down the problem. Then I told him that this is a big topic. I will write an article carefully on the Internet, then I gave him my blog address. Then I added, "Believe me, ev
Android queries the contact name based on the phone number and exports all contacts in the address book. method 1 /*
2 * obtain the contact name based on the phone number
3 */
4 public static string getcontactnamebyphonenumber (context, string address ){
5 string [] projection = {contactscontract. phonelookup. display_name,
6 contactscontract. commondatakinds. Phone. Number };
7
8 // Add yourself to mspeers
9 cursor = context. getcontentresolver (). Q
# Use file manipulation functions to implement contacts/*file Stream Implementation Address Book description: We usually test code input data, but once each time the program is finished, the data will be gone, such as test communicationrecord, enter a lot of information to find a place to change, it is necessary to end the program, the next time to re-enter, very troublesome right, file stream implementation ofThe advantage is that you can save our in
[]{phone.display_name, Phone.number }, NULL, null, phone.sort_key_primary); 2 if (cursor! = null) { 3 while (Cursor.movetonext ()) {4 Contactbean contact = new Contactbean (); 5 contact.setname (cursor.getstring (0)), 6 Contact.setphone (cursor.getstring (1 cursor.close (); 10 }Second method: You can get relevant information according to the contact ID.1 uri uri = uri.parse ("Content://com.android.contacts/
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 order to save the database space)
On the Internet to see some of the practice of MSN Contact, personal found that most of the practice is not the official way, I would like to share my implementation.
There are generally 3 ways to access MSN contacts:
1: Through the MSN Agreement to get contacts, this way there are many online, the data is relatively stable, but there is a disadvantage, this way will be the line of the MSN user T off.
2: T
Then probably introduced after the monitoring event, then the touch screen of the most concerned should be more contact;
-----get multi-touch nsset *alltouches = [Event Alltouches]; Uitouch *touchone = [[Alltouches allobjects]objectatindex:0]; Uitouch *touchtwo = [[Alltouches allobjects]objectatindex:1]; //... Analogy
Get more ruthless simple, then the basic commonly used to write down the following: 1-to determine whether the user clicks or double click (for a contact point)
if ([alltouchesco
The code for reading the names and phone numbers of all contacts on the internet is as follows:
ContentResolver cr = getContentResolver ();
Cursor cursor = cr. query (ContactsContract. Contacts. CONTENT_URI, null );
While (cursor. moveToNext ())
{
// Obtain the contact name
Int nameFieldColumnIndex = cursor. getColumnIndex (PhoneLookup. DISPLAY_NAME );
String name = cursor. getString (nameFieldColumnIndex )
I once met a student at Peking University and asked me, "Teacher, do you say learning is important, or do you have business contacts ?" Looking at his face, I took out my notebook and noted down the problem. Then I told him that this is a big topic. I will write an article carefully on the Internet, then I gave him my blog address. Then I added, "Believe me, even if the so-called contacts are important, the
In the first edition:We have created a structure array with 1000 elements to hold the information of the Address Book, which has the disadvantage that when the contacts stored in the contacts are less likely to waste memory resources.In the second edition:We use dynamic memory to open up the array, and based on the increase in the number of contacts, and constant
To store contacts in the phone card to your mobile phone, follow these steps:1. In the following standby status, find the application icon. Normally, it is in the lower right corner.2. Find the application and then find the setting icon in the application.3. There is a [contact] button in it. We click the contact, as shown in the figure.4. After entering the contact, find the import/export button and click it to open it, as shown in the figure.5. then
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 it.2.mainactivity.java pages to write queries
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.