Android.database.sqlite.SQLiteConstraintException: contacts.pinned may not be NULL (code 19)

  • This bug just hit me and was gone after deleting the affected contact from the server. I believe i triggered the issue by adding the contact first and moving it into a contacts group using the ownCloud webinterface later after syncing.

  • I’m having the same issue with Alcatel 5038D stock rom, DAVdroid 0.7.2.

  • I fixed the problem starring the contact and syncing. Then I can unstar it and it syncs OK from now on.

  • developer

    And again with 0.7.5 (from Play Store):

    Moto X (ghost) with Android 4.4:

    android.database.sqlite.SQLiteConstraintException: contacts.pinned may not be NULL (code 19)
    at android.database.DatabaseUtils.readExceptionFromParcel(
    at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(
    at android.content.ContentProviderProxy.applyBatch(
    at android.content.ContentProviderClient.applyBatch(
    at at.bitfire.davdroid.resource.LocalCollection.commit(
    at at.bitfire.davdroid.resource.LocalAddressBook.commit(
    at at.bitfire.davdroid.syncadapter.SyncManager.pullChanged(
    at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(
    at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(
    at android.content.AbstractThreadedSyncAdapter$

  • developer

    According to, the RawContact’s PINNED is always DEFAULT unpinned, so there should be no need to set it explicitly.

Log in to reply

Similar topics