Je reçois cette erreur lors de la mise à jour du nom dans un contact existant. Mon code:android.database.sqlite.SQLiteException: erreur inconnue (code 0): Impossible de convertir BLOB en chaîne
String nameWhere = ContactsContract.Data.CONTACT_ID + "=? AND " + ContactsContract.Data.MIMETYPE + "='"
+ ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE + "'";
String[] idParam = new String[]{contacts.getContactId()};
ContentValues values = new ContentValues();
values.put(ContactsContract.Contacts.Data.RAW_CONTACT_ID, id);
values.put(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, contacts.getName());
int update = context.getContentResolver().update(ContactsContract.Data.CONTENT_URI, values, nameWhere, idParam);
J'ai aussi aller à ces liens: SQLiteException Unable to convert BLOB to string when contact have photo. Android et d'autres liés à ce problème.
et mes notations
E/AndroidRuntime: exception irrécupérable: principal procédé: com.embedded.contacts, PID: 15248 android.database.sqlite.SQLiteException: erreur inconnue (code 0) n'a pas pu être converti BLOB à la chaîne ################################################# ################### Code d'erreur: 0 (SQLITE_OK) Causé par: erreur inconnue (code 0): Impossible de convertir BLOB en chaîne ##### ################################################## ########## ################################################## ############### Code d'erreur: 0 (SQLITE_OK) Causé par: erreur inconnue (code 0): Impossible de convertir BLOB en chaîne ######### ################################################## ###### Code d'erreur: 0 (SQLITE_OK) Causé par: unknown error (code 0): Impossible de convertir BLOB en chaîne ################## ############################################### ## ################################################## ############# at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:179) à android. database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:135) à android.content.ContentProviderProxy.update (ContentProviderNative.java:568)
Afficher les journaux complets ... –
@ ρяσѕρєяK Je ajouté les journaux, vérifiez à nouveau. – user8269038