contact有9个表
ContactsContractdefinesanextensibledatabaseofcontact-relatedinformation.
Contactinformationisstoredinathree-tierdatamodel:
最重要的是下面三个表
*Arowinthe<wbr style="line-height:25px">ContactsContract.Data</wbr><wbr style="line-height:25px">tablecanstoreanykindofpersonaldata,suchasaphonenumberoremailaddresses.Thesetofdatakindsthatcanbestoredinthistableisopen-ended.Thereisapredefinedsetofcommonkinds,butanyapplicationcanadditsowndatakinds.<br style="line-height:25px"> 具体见《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105651115532/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RawContacts</a></strong>》<br style="line-height:25px"> *Arowinthe<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.RawContacts</wbr></span><wbr style="line-height:25px">tablerepresentsasetofdatadescribingapersonandassociatedwithasingleaccount(forexample,oneoftheuser'sGmailaccounts).<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105651115532/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RawContacts</a></strong>》<br style="line-height:25px"> *Arowinthe<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Contacts</wbr></span><wbr style="line-height:25px">tablerepresentsanaggregateofoneormoreRawContactspresumablydescribingthesameperson.WhendatainorassociatedwiththeRawContactstableischanged,theaffectedaggregatecontactsareupdatedasnecessary.<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105801218196/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">Contact类</a></strong>》<br style="line-height:25px"> Othertablesinclude:<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Groups,</wbr></span><wbr style="line-height:25px">whichcontainsinformationaboutrawcontactgroupssuchasGmailcontactgroups.ThecurrentAPIdoesnotsupportthenotionofgroupsspanningmultipleaccounts.<br style="line-height:25px"> 具体见《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/171040579201051042839792/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">Groups</a></strong>》<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.StatusUpdates</wbr></span><wbr style="line-height:25px">,whichcontainssocialstatusupdatesincludingIMavailability.<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.AggregationExceptions</wbr></span><wbr style="line-height:25px">,whichisusedformanualaggregationanddisaggregationofrawcontacts<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/1710405792010594256722/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">AggregationExceptions</a></strong>》<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Settings</wbr></span><wbr style="line-height:25px">,whichcontainsvisibilityandsyncsettingsforaccountsandgroups.<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.SyncState</wbr></span><wbr style="line-height:25px">,whichcontainsfree-formdatamaintainedonbehalfofsyncadapters<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.PhoneLookup</wbr></span><wbr style="line-height:25px">,whichisusedforquickcaller-IDlookup<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/1710405792010584341058/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">用PhoneLookup进行电话号码查询</a></strong>》<br style="line-height:25px"><span style="line-height:25px"><wbr style="line-height:25px">注意:</wbr></span>关于Contacts的android.provider.Contacts包已经被抛弃了。比如Contacts.People等。<br style="line-height:25px"> 新的API在android.provider.ContactsContract里面。</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
ContactsContractdefinesanextensibledatabaseofcontact-relatedinformation.
Contactinformationisstoredinathree-tierdatamodel:
最重要的是下面三个表
*Arowinthe<wbr style="line-height:25px">ContactsContract.Data</wbr><wbr style="line-height:25px">tablecanstoreanykindofpersonaldata,suchasaphonenumberoremailaddresses.Thesetofdatakindsthatcanbestoredinthistableisopen-ended.Thereisapredefinedsetofcommonkinds,butanyapplicationcanadditsowndatakinds.<br style="line-height:25px"> 具体见《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105651115532/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RawContacts</a></strong>》<br style="line-height:25px"> *Arowinthe<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.RawContacts</wbr></span><wbr style="line-height:25px">tablerepresentsasetofdatadescribingapersonandassociatedwithasingleaccount(forexample,oneoftheuser'sGmailaccounts).<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105651115532/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RawContacts</a></strong>》<br style="line-height:25px"> *Arowinthe<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Contacts</wbr></span><wbr style="line-height:25px">tablerepresentsanaggregateofoneormoreRawContactspresumablydescribingthesameperson.WhendatainorassociatedwiththeRawContactstableischanged,theaffectedaggregatecontactsareupdatedasnecessary.<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/17104057920105801218196/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">Contact类</a></strong>》<br style="line-height:25px"> Othertablesinclude:<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Groups,</wbr></span><wbr style="line-height:25px">whichcontainsinformationaboutrawcontactgroupssuchasGmailcontactgroups.ThecurrentAPIdoesnotsupportthenotionofgroupsspanningmultipleaccounts.<br style="line-height:25px"> 具体见《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/171040579201051042839792/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">Groups</a></strong>》<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.StatusUpdates</wbr></span><wbr style="line-height:25px">,whichcontainssocialstatusupdatesincludingIMavailability.<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.AggregationExceptions</wbr></span><wbr style="line-height:25px">,whichisusedformanualaggregationanddisaggregationofrawcontacts<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/1710405792010594256722/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">AggregationExceptions</a></strong>》<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.Settings</wbr></span><wbr style="line-height:25px">,whichcontainsvisibilityandsyncsettingsforaccountsandgroups.<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.SyncState</wbr></span><wbr style="line-height:25px">,whichcontainsfree-formdatamaintainedonbehalfofsyncadapters<br style="line-height:25px"> *<span style="line-height:25px"><wbr style="line-height:25px">ContactsContract.PhoneLookup</wbr></span><wbr style="line-height:25px">,whichisusedforquickcaller-IDlookup<br style="line-height:25px"> 具体见:《<strong><a title="阅读全文" target="_blank" href="http://hubingforever.blog.163.com/blog/static/1710405792010584341058/" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">用PhoneLookup进行电话号码查询</a></strong>》<br style="line-height:25px"><span style="line-height:25px"><wbr style="line-height:25px">注意:</wbr></span>关于Contacts的android.provider.Contacts包已经被抛弃了。比如Contacts.People等。<br style="line-height:25px"> 新的API在android.provider.ContactsContract里面。</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>