title: Make a 2 way contact sync adapter
body: <p>Hello dear Stackoverflowers !</p>
  
  <p>I work on a CardDAV sync source for Android 2.3.3, and I don't understand a think.
  I read carefully the document about samplesyncadaptater, which works only for reading contacts from distant serveur.<br>
  But in my case, I'm trying to add a source that aloud to both read contact from server and write contact to server.  </p>
  
  <p>At this point:<br>
  - My project appears when you want to add a sync source in Android.<br>
  - I can parametize my source and authentication works<br>
  - When I go to contact app and go to the account visibility option (menu name depends of your phone rom) I can select my source to show its contact<br>
  - but when I try to create a contact, only my gmail and outlook source are provided.
  Maybe I miss someting in the various xml file I need.   </p>
  
  <p>Plz help me I put my different xml files...</p>
  
  <p>Here's the <strong><em>Manifest.xml</em></strong>  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest package="android.carddav"
  android:versionCode="1"
  android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;uses-permission
      android:name="android.permission.GET_ACCOUNTS" /&gt;
  &lt;uses-permission
      android:name="android.permission.USE_CREDENTIALS" /&gt;
  &lt;uses-permission
      android:name="android.permission.MANAGE_ACCOUNTS" /&gt;
  &lt;uses-permission
      android:name="android.permission.AUTHENTICATE_ACCOUNTS" /&gt;
  &lt;uses-permission
      android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission
      android:name="android.permission.WRITE_SETTINGS" /&gt;
  &lt;uses-permission 
      android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission
      android:name="android.permission.WRITE_SECURE_SETTINGS" /&gt;
  &lt;uses-permission
      android:name="android.permission.READ_CONTACTS" /&gt;
  &lt;uses-permission
      android:name="android.permission.WRITE_CONTACTS" /&gt;
  &lt;uses-permission
      android:name="android.permission.READ_SYNC_STATS" /&gt;
  &lt;uses-permission
      android:name="android.permission.READ_SYNC_SETTINGS" /&gt;
  &lt;uses-permission
      android:name="android.permission.WRITE_SYNC_SETTINGS" /&gt;
  
  &lt;uses-sdk android:minSdkVersion="10" /&gt;
  
  &lt;application
      android:icon="@drawable/icon"
      android:label="@string/app_name" &gt;
      &lt;service
          android:name=".authenticator.AuthenticationService"
          android:exported="true"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="android.accounts.AccountAuthenticator" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.accounts.AccountAuthenticator"
              android:resource="@xml/authenticator" /&gt;
      &lt;/service&gt;
      &lt;service
          android:name=".syncadapter.SyncService"
          android:exported="true" android:enabled="true"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="android.content.SyncAdapter" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.content.SyncAdapter"
              android:resource="@xml/syncadapter" /&gt;
  
      &lt;/service&gt;
      &lt;activity
          android:name=".authenticator.CardDAVActivity"
          android:label="@string/app_name" 
          android:excludeFromRecents="true"&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;  
  </code></pre>
  
  <p>Here's the <strong><em>syncadaptater.xml</em></strong>:<br>
      </p>
  
  <p>and finally here's the <strong><em>authenticator.xml</em></strong>:<br>
      
          </p>