안드로이드 개발 질문/답변
(글 수 45,052)
ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
ops.clear();
ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
.withValueBackReference(Data.RAW_CONTACT_ID,rawContactInsertIndex)
.withValue(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
.withValue(StructuredName.FAMILY_NAME, "James")
.build());
getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
이런 식으로 넣으려고 하는데요..
일단 Data.RAW_CONTACT_ID값은 무슨값이며 어떻게 구해야 하나요?
구글 가서 찾아봐도 잘 모르겠네요 ㅜㅜ
그리고 마지막 줄에서
05-18 17:55:09.168: ERROR/JavaBinder(110): java.lang.ArrayIndexOutOfBoundsException: asked for back ref 0 but there are only 0 back refs
이런 에러가 나는데요 왜 그런지좀 알려주세요^^
ops.clear();
ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
.withValueBackReference(Data.RAW_CONTACT_ID,rawContactInsertIndex)
.withValue(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
.withValue(StructuredName.FAMILY_NAME, "James")
.build());
getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
이런 식으로 넣으려고 하는데요..
일단 Data.RAW_CONTACT_ID값은 무슨값이며 어떻게 구해야 하나요?
구글 가서 찾아봐도 잘 모르겠네요 ㅜㅜ
그리고 마지막 줄에서
05-18 17:55:09.168: ERROR/JavaBinder(110): java.lang.ArrayIndexOutOfBoundsException: asked for back ref 0 but there are only 0 back refs
이런 에러가 나는데요 왜 그런지좀 알려주세요^^