1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 /** 4 * Copyright (c) 2011, The Android Open Source Project 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 --> 19 20 <ContactsAccountType 21 xmlns:android="http://schemas.android.com/apk/res/android" 22 > 23 <EditSchema 24 > 25 <!-- 26 Name: 27 - maxOccurs must be 1 28 - No types. 29 30 - Currently all the supportsXxx attributes must be true, but here's the plan for the 31 future: 32 (There's some hardcoded assumptions in the contact editor, which is one reason 33 for the above restriction) 34 35 - "Family name" and "Given name" must be supported. 36 - All sync adapters must support structured name. "display name only" is not 37 supported. 38 -> Supporting this would require relatively large changes to 39 the contact editor. 40 41 - Fields are decided from the attributes: 42 StructuredName.DISPLAY_NAME if supportsDisplayName == true 43 StructuredName.PREFIX if supportsPrefix == true 44 StructuredName.FAMILY_NAME (always) 45 StructuredName.MIDDLE_NAME if supportsPrefix == true 46 StructuredName.GIVEN_NAME (always) 47 StructuredName.SUFFIX if supportsSuffix == true 48 StructuredName.PHONETIC_FAMILY_NAME if supportsPhoneticFamilyName == true 49 StructuredName.PHONETIC_MIDDLE_NAME if supportsPhoneticMiddleName == true 50 StructuredName.PHONETIC_GIVEN_NAME if supportsPhoneticGivenName == true 51 52 - DataKind.PSEUDO_MIME_TYPE_DISPLAY_NAME is always added. 53 - DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME is added 54 if any of supportsPhoneticXxx == true 55 --> 56 <!-- Fallback/Google definition. Supports all. --> 57 <DataKind kind="name" 58 maxOccurs="1" 59 supportsPrefix="true" 60 supportsMiddleName="true" 61 supportsSuffix="true" 62 supportsPhoneticFamilyName="true" 63 supportsPhoneticMiddleName="true" 64 supportsPhoneticGivenName="true" 65 > 66 </DataKind> 67 68 <!-- Exchange definition. No display-name, no phonetic-middle. 69 <DataKind kind="name" 70 supportsPrefix="true" 71 supportsMiddleName="true" 72 supportsSuffix="true" 73 supportsPhoneticFamilyName="true" 74 supportsPhoneticMiddleName="false" 75 supportsPhoneticGivenName ="true" 76 > 77 </DataKind> 78 --> 79 80 <!-- 81 Photo: 82 - maxOccurs must be 1 83 - No types. 84 --> 85 <DataKind kind="photo" maxOccurs="1" /> 86 87 <!-- 88 Phone definition. 89 - "is secondary?" is inferred from type. 90 --> 91 <!-- Fallback, Google definition. --> 92 <DataKind kind="phone" > 93 <!-- Note: Google type doesn't have obsolete ones --> 94 <Type type="mobile" /> 95 <Type type="home" /> 96 <Type type="work" /> 97 <Type type="fax_work" /> 98 <Type type="fax_home" /> 99 <Type type="pager" /> 100 <Type type="other" /> 101 <Type type="custom"/> 102 <Type type="callback" /> 103 <Type type="car" /> 104 <Type type="company_main" /> 105 <Type type="isdn" /> 106 <Type type="main" /> 107 <Type type="other_fax" /> 108 <Type type="radio" /> 109 <Type type="telex" /> 110 <Type type="tty_tdd" /> 111 <Type type="work_mobile"/> 112 <Type type="work_pager" /> 113 <Type type="assistant" /> 114 <Type type="mms" /> 115 </DataKind> 116 117 <!-- Exchange definition. 118 <DataKind kind="phone" > 119 <Type type="home" maxOccurs="2" /> 120 <Type type="mobile" maxOccurs="1" /> 121 <Type type="work" maxOccurs="2" /> 122 <Type type="fax_work" maxOccurs="1" /> 123 <Type type="fax_home" maxOccurs="1" /> 124 <Type type="pager" maxOccurs="1" /> 125 <Type type="car" maxOccurs="1" /> 126 <Type type="company_main" maxOccurs="1" /> 127 <Type type="mms" maxOccurs="1" /> 128 <Type type="radio" maxOccurs="1" /> 129 <Type type="assistant" maxOccurs="1" /> 130 </DataKind> 131 --> 132 133 <!-- 134 Email 135 --> 136 <!-- Fallback/Google definition. --> 137 <DataKind kind="email" > 138 <!-- Note: Google type doesn't have obsolete ones --> 139 <Type type="home" /> 140 <Type type="work" /> 141 <Type type="other" /> 142 <Type type="mobile" /> 143 <Type type="custom" /> 144 </DataKind> 145 146 <!-- 147 Exchange definition. 148 - Same definition as "fallback" except for maxOccurs=3 149 <DataKind kind="email" maxOccurs="3" > 150 <Type type="home" /> 151 <Type type="work" /> 152 <Type type="other" /> 153 <Type type="mobile" /> 154 <Type type="custom" /> 155 </DataKind> 156 --> 157 158 <!-- 159 Nickname 160 - maxOccurs must be 1 161 - No types. 162 --> 163 <DataKind kind="nickname" maxOccurs="1" /> 164 165 <!-- 166 Im: 167 - The TYPE column always stores Im.TYPE_OTHER (defaultValues is always set) 168 - The user-selected type is stored in Im.PROTOCOL 169 --> 170 <!-- Fallback, Google definition. --> 171 <DataKind kind="im" > 172 <Type type="aim" /> 173 <Type type="msn" /> 174 <Type type="yahoo" /> 175 <Type type="skype" /> 176 <Type type="qq" /> 177 <Type type="google_talk" /> 178 <Type type="icq" /> 179 <Type type="jabber" /> 180 <Type type="custom" /> 181 </DataKind> 182 183 <!-- Exchange definition. 184 <DataKind kind="im" maxOccurs="3" > 185 <Type type="aim" /> 186 <Type type="msn" /> 187 <Type type="yahoo" /> 188 <Type type="skype" /> 189 <Type type="qq" /> 190 <Type type="google_talk" /> 191 <Type type="icq" /> 192 <Type type="jabber" /> 193 <Type type="custom" /> 194 </DataKind> 195 --> 196 197 <!-- 198 Postal address. 199 --> 200 <!-- Fallback/Google definition. Not structured. --> 201 <DataKind kind="postal" needsStructured="false" > 202 <Type type="home" /> 203 <Type type="work" /> 204 <Type type="other" /> 205 <Type type="custom" /> 206 </DataKind> 207 208 <!-- Exchange definition. Structured. 209 <DataKind kind="postal" needsStructured="true" > 210 <Type type="work" /> 211 <Type type="home" /> 212 <Type type="other" /> 213 </DataKind> 214 --> 215 216 <!-- 217 Organization: 218 - Fields are fixed: COMPANY, TITLE 219 - maxOccurs must be 1 220 - No types. 221 --> 222 <DataKind kind="organization" maxOccurs="1" /> 223 224 <!-- 225 Website: 226 - No types. 227 --> 228 <DataKind kind="website" /> 229 230 <!-- 231 Below kinds have nothing configurable. 232 - No types are supported. 233 - maxOccurs must be 1 234 --> 235 <DataKind kind="sip_address" maxOccurs="1" /> 236 <DataKind kind="note" maxOccurs="1" /> 237 238 <!-- 239 Google/Exchange supports it, but fallback doesn't. 240 <DataKind kind="group_membership" maxOccurs="1" /> 241 --> 242 243 <!-- 244 Event 245 --> 246 <DataKind kind="event" dateWithTime="false"> 247 <Type type="birthday" maxOccurs="1" yearOptional="true" /> 248 <Type type="anniversary" /> 249 <Type type="other" /> 250 <Type type="custom" /> 251 </DataKind> 252 253 <!-- 254 Exchange definition. dateWithTime is needed only for Exchange. 255 <DataKind kind="event" dateWithTime="true"> 256 <Type type="birthday" maxOccurs="1" /> 257 </DataKind> 258 --> 259 260 <!-- 261 Relationship 262 --> 263 <DataKind kind="relationship" > 264 <Type type="assistant" /> 265 <Type type="brother" /> 266 <Type type="child" /> 267 <Type type="domestic_partner" /> 268 <Type type="father" /> 269 <Type type="friend" /> 270 <Type type="manager" /> 271 <Type type="mother" /> 272 <Type type="parent" /> 273 <Type type="partner" /> 274 <Type type="referred_by" /> 275 <Type type="relative" /> 276 <Type type="sister" /> 277 <Type type="spouse" /> 278 <Type type="custom" /> 279 </DataKind> 280 </EditSchema> 281 </ContactsAccountType> 282