Use the Contacts for Android app to edit a raw contact that has been added by a custom ContentProvider

My application adds the "Bob" contact to the address book using a custom one ContentProvider. In the "Contacts for Android" application, Bob appears just like any other (Google) contact. But when I edit Bob in the Contacts application, the data provided by my application is not editable. So far so good.

My question is . Is there a way from my application to launch the Contacts application so that the user can edit the part of Bob that belongs to my application?

I tried using the appropriate Intentone as described in this Android manual , but using the raw uri contact for Bob:

Uri rawUri = getRawContactUri("Bob");
Intent intent = new Intent(Intent.ACTION_EDIT, rawUri);
startActivityForResult(intent, EDIT_CONTACT_RESULT);

which calls the Contacts application, but still has no way to edit Bob’s data.

There are many questions about SO that cover how to open an application from the Contacts application when a custom field is selected or how to shoot correctlyACTION_EDIT .
But I did not find any statement - including the link - if you can use the Contacts application so that the user can edit the user’s raw contacts. Does anyone have a hint and preferably a link?

+3
1

EditSchema contact.xml , SyncService , :

<service
    android:name=".syncadapter.SyncService"
    android:exported="true">

    <intent-filter>
        <action android:name="android.content.SyncAdapter" />
    </intent-filter>

    <meta-data
        android:name="android.content.SyncAdapter"
        android:resource="@xml/syncadapter" />
    <meta-data
        android:name="android.provider.CONTACTS_STRUCTURE"
        android:resource="@xml/contacts" />
</service>

EditSchema : http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.2.2_r1/packages/apps/Contacts/tests/res/xml/test_basic_contacts.xml/

+1

All Articles