This article illustrates the way Android programming reads contacts based on contacts. Share to everyone for your reference, specific as follows:
Introduction to Android Contacts:
Here is an introduction to the Android Address Book database. This includes the basics of Android using contacts to access SQLite and lear
1. ReviewThe previous study of the Android file storage, including storage on the SD card;2. Focus(1) Learn about one of the four components Content Provider(2) realize the contact person in the inquiry communication record(3) To implement new contacts to the communication record.3. Introduction(1) ContentProvider is more complex than other methods, but its function is revolutionary in other ways. (2) It enables data manipulation across applications.
Introduction to Android Contacts
Learn to work with the Android contacts database. Basic knowledge of accessing SQLite in Android along with using Cursors is expected. The Android SQLite and Cursor Article for more information. Google changed the contacts database moving from 1.x to 2.0 versions of Android. This tutorial is broken into 3 sections. The covering a
When I first started using the iPhone, I didn't know how to delete the address book, but I didn't respond to the usual slide. Later I learned that to delete a record, I should click this record first, click Edit, and then click Delete contact at the bottom of the page, which is very troublesome.
It is painful to delete contacts frequently. After jailbreak, you can install the plug-in and delete contacts to
. Add data (name, Email,address,phone and other information)//Note: One message is the same record, so multiple insert operations are performed when adding multiple information for a contactUri Data_uri = Uri.parse ("Content://com.android.contacts/data"); Values.clear (); //be sure to empty before reusing or it will affect the following insert OperationValues.put ("raw_contact_id", max_contact_id); Values.put ("MimeType", "Vnd.android.cursor.item/name"); Values.put ("Data1", "1505");
Hardware: iPhone, Mac, and Windows
Task: Synchronize all contacts on the iPhone, desktop, and laptop.
Advantages and disadvantages:
Mobileme1) the interface is clear and easy to use2) good compatibility with iPhone, synchronous grouping3) convenient webpage operations4) rice, although Ebay has a cheap annual fee5) when grouping, you cannot clearly see which contacts are grouped or which groups are assign
How to get android mobile phone contacts and display them by letter (3): android contacts
If you get the contact Profile and display it:
How to obtain bitmap Based on photoId:
public static Bitmap getContactPhoto(Context context, long photoId, BitmapFactory.Options options) { if (photoId
Add the following to bindView:
protected void setContactPhoto(Cursor cursor, final ImageView viewToUse, int
Uri MUri =uri.parse ("content://com.android.contacts/contacts?android.provider.extra.address_book_index=true Directory=0 ");//contactscontract.commondatakinds.phone.content_uri; URI of the contact person
string[] mprojection = new string[] {
contacts._id,//0
Contacts.display_name_primary,//1
Contacts.contact_presence,//2
Contacts.contact_status,//3
CONTACTS.PHOTO_ID,//4
Contacts.photo_thumbnail_uri,//5
Co
Using Android Contacts (I) API For 1.6 and Before 1.6
If you just read the begining of this article the first bit of this page is going to look familiar. this page is designed to act as a standalone guide to working with the contacts API in Android 1.6 and before. if you have just read the beginning of this article, do you feel familiar with each other. This docu
Next, the android content provider-content providers (1)
Contacts provider is a powerful and flexible component in Android. It manages the data in the system address book and provides external access interfaces to access and operate the system address book.
The organization chart of contacts provider is as follows:
It can be seen that the address book of the Android system is a three-tier architecture and
associated with the original contact table by ID. Let's take a look at the relationship between the three:
The top layer displays the aggregate contact table contacts, with the original contact table rawcontacts in the middle. Three accounts (two Gmail accounts and one Twitter account) store the contact information respectively, the bottom layer is the data table, which stores the contact information. Th
object to obtain the contentresolver type instance object, and then you can operate on the corresponding data.
Next we will demonstrate this mechanism through the contact instance.
In Android, all contact operations are performed through a unified way to read and write data. We can open/data/COM. Android. providers. contacts to see the contact's Data source:
If you are interested, you can export this file and open it with professional tools and soft
Contactscontract.class file to see the source code.(2) Table structureAs we said before, ContentProvider is the form of a table to store the data, the system contact is the case, generally stored in the data/data/com.android.providers.contacts/databases/ In Contacts2.db, we can look through the adb shell command line, or we can export this contacts2.db file through the SQLite tool, and here for our export.Locate the file, and then click the Export bu
good compatibility with other software. We took a few mobile phones and software that support carddav and cannot sync with it smoothly.Outlook synchronizes the 163 account address book and calendar.This problem can be solved through a set of outlook plug-ins developed by the Evo teamEvo collaborator for outlook
650) This. width = 650; "alt =" 163 how to import mail contacts and calendars to Outlook 2007 ~ 2013-jamesting168-cloud computing "style =" m
Using content providers to read contacts
Inserting contacts with content providers
The principle of the content observer
Use the Content Viewer to monitor the System application database or its own application database changes
Using content providers to read contactsReading a contact is a lot more complicated than reading a text message, so let's step through it.Take a
Migrating contacts from a system application to a common application
1. The first problem encountered was hiding the API problem.
There is a reason why Google hides some APIs (public classes, methods, or constants marked with @ hide. A major reason is that the Android system is still evolving. Android 2.3.4 is coming soon from 1.0 and 1.1. These hidden APIs may be unstable. Therefore, using hidden APIs means that programs are less compatible. Theref
Preface
It's time to share new information with you.
Recently, some friends asked me, "Can I pull the address book and calendar in Gmail into outlook 」
「 Certainly 」
Because Gmail is a cloud service provided by Google
So of course, let's take a look at whether Google's Google Apps sync for Microsoft Outlook software provides such a feature.
There are still some restrictions on the integration of googleapps sync for Microsoft Outlook and Microsoft
Mobile Security Guard ------ sim card binding reading contacts on the mobile phone anti-theft page, ------ sim
Implemented functions:
SIM card binding
Read contacts
Technical points:
SIM card binding
Get boot Broadcast
Read contacts
Use of SimpleAdapter
Data transfer between activities
SIM card binding
Ideas:
Create a TelephonyManager object
Telep
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
. PackageCom.user.android2_lesson_06_systemcontentprivider;ImportAndroid.content.ContentResolver;ImportAndroid.content.ContentValues;ImportAndroid.database.Cursor;ImportAndroid.net.Uri;Importandroid.support.v7.app.AppCompatActivity;ImportAndroid.os.Bundle;ImportAndroid.util.Log;ImportAndroid.view.View;ImportAndroid.widget.Button;ImportAndroid.widget.Toast;/** * Call system-provided Contentprivider * today to get contacts for example * system when writ
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.