Since Android 2.0 SDK, the class related to the contact provider has changed to contactscontract, although the old android. provider. contacts can be used, but the method marked as deprecated In the SDK will be abandoned and not recommended, and Android is added since Android
On Android 4.4.3 , the contact's avatar displays the first letter by default, but does not support Chinese characters such as:If the first digit of the contact's name is an English character (A-Z | | A-Z), the default avatar will display the first letter.If the first Chinese character is displayed when Chinese is supported, it will be happy.Then let's see how to do this by modifying the source code to achieve this small function ~Let's get to know the
Android obtains the contact information in the address book. The Code is as follows:
/*** Get the contact information, including the name, number, and profile * @ return */private arraylist
Here: phonecontactor is a custom class for storing contact information. Do not forget to add the permission:
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. Ph
// Jump to the contact pagePrivate void pickContact (){// Create an intent to "pick" a contact, as defined by the content provider URIIntent intent = new Intent (Intent. ACTION_PICK, Contacts. CONTENT_URI );StartActivityForResult (intent, PICK_CONTACT_REQUEST );}// The data in the returned Intent is The Uri of the selected contact, indicating The resource locatio
The ListView In the Android contact is unique, but the source code is relatively copied. It is not easy to extract it from the source code when we want to use it, and it is prone to errors, in the past few days, I have extracted it and written it as a simple example. I will give myself a memo, but I will share it with you. Well, let's take a look:
The first is the encapsulated PinnedHeaderListView with a h
This article describes the Android programming to read mobile phone contacts, dial-up, send SMS and long by menu operation method. Share to everyone for your reference, specific as follows:
1.Andrid Project Chart ↓ main operation diagram in red box in the file.
2. First layout code is as follows
A, main.xml program to run the main interface, mainly using ListView List control display mobile contact
Company to do the e-commerce app, now to join the contact customer service function, at first thinking is to do an instant chat system, did not do before, the two days began to evil, then the demand changed, to call QQ open platform, do a temporary session on the line, which saves a lot of strength, also do not need to go to the component service end.Steps:1. Refer to the QQ SDK source code file.Create a project and copy the Open-sdk.jar file and the
Android 2.3 began to adopt SQLite 3.7, while SQLite 3.7 began to introduce Wal mode (write ahead log), a new transaction control mechanism,
So we will see the. DB-Wal file format in the System text message and contact database ,.
The purpose of the introduction is to ensure Database Consistency and avoid Database Consistency when the program crashes. So that's why
The 3rd-party program can read the
You can easily manage contact information through interfaces provided by the Android system.
Add
Add contactCode on 1.6
String peopleName = "name";
2.1, the following code is required before you can add
String peopleName = "name";
Add phone numberYou can add different types of phone numbers based on the TYPE.The types supported in 1.6 are: TYPE_CUSTOM, TYPE_FAX_HOME, TYPE_FAX_WORK, TYPE_HOME, TYPE_MOBILE,
://github.com/alibaba/AndFixTools folder is a tool that downloads to a localBy the way, put just two bug.apk and fixedbug.apk and signed files into the folderBecause we only have one fixedbug.apk, so we use the following generated codeapkpatch -f Specific practices1. First open cmd or terminal, CD to the current directory2. Typingapkpatch-1.0.3/apkpatch.sh -f fixedbug.apk -t bug.apk -o Out -k a.jks -p 123456 -a 654321 -e 6543213. At this time the Apatch file under this out folder is the Hot up
Note: This article is translated from Google's official Android developers training document, translator technology generally, because of the love of Android and produced the idea of translation, purely personal interests and interests.Original link: http://developer.android.com/training/contacts-provider/retrieve-details.htmlThis lesson will show you how to get detailed data for a
How to automatically remove a name when the android Copy contact arrives at the SIM card1: Add related functions and variablesPrivate int SpecEncodingArrLen = 44; Private short [] [] specialEncoding = {{0x0040, 0x0000 },//@{0x00A3, 0x0001 },{0x0024, 0x0002 },{0x00A5, 0x0003 },{0x00E8, 0x0004 },{0x00E9, 0x0005 },{0x00F9, 0x0006 },{0x00EC, 0x0007 },{0x00F2, 0x0008 },{0x00C7, 0x0009 },{0x0020, 0x000A },{0x00D8
Since I used the Android system in M8, I have carefully experienced several Rom, and most Rom problems are still quite large. The most prominent problem is that the operation is relatively slow and there is often no signal, in this way, it is not good to affect daily use. As for the problem, I can't use cameras or do some advanced functions.
After verification and testing, m8 android_for_a13.5_ version ll_bz0.3.7z is used. This version uses the M9 Ro
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.