我在插入电话簿联系人时遇到错误

时间:2014-01-09 14:20:57

标签: android

while(c.moveToNext())
        {
            cv.put(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, c.getString(1).toString());
            cv.put(ContactsContract.CommonDataKinds.Phone.NUMBER, c.getString(2).toString());

            Log.i("test",cr.insert(android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_URI, cv).toString());
            cv.clear();
            cv.put(ContactsContract.RawContacts.ACCOUNT_TYPE ,"com.Lge.sync");
            cr.insert(android.provider.ContactsContract.RawContacts.CONTENT_URI, cv);

        }

0 个答案:

没有答案