How to programmatically insert call log entries WITH display name and photo?

Posted by dchappelle on Stack Overflow See other posts from Stack Overflow or by dchappelle
Published on 2011-01-14T21:49:33Z Indexed on 2011/01/14 21:53 UTC
Read the original article Hit count: 196

Filed under:

I am able to programmatically insert an entry into the Android call log with a number, date, duration & type BUT I cannot figure out how to also include a photo, label and name?

I do the following.. (didn't know what to even try for the photo)

ContentValues values = new ContentValues();
values.put(CallLog.Calls.NUMBER, number);
values.put(CallLog.Calls.CACHED_NAME, name);
values.put(CallLog.Calls.CACHED_NUMBER_LABEL, label);
values.put(CallLog.Calls.DATE, date);
values.put(CallLog.Calls.DURATION, duration);
values.put(CallLog.Calls.TYPE, myCallType);
context.getContentResolver().insert(CallLog.Calls.CONTENT_URI, values);

© Stack Overflow or respective owner

Related posts about android