views:

8

answers:

0

My goal is to collect all unknown phone numbers from the Call Log. This can be achieved by the following code:

private static final String[] CALLOG_PROJECTION = {CallLog.Calls._ID,
        CallLog.Calls.CACHED_NAME, CallLog.Calls.NUMBER};
private static final String CALLOG_WHERE = CallLog.Calls.CACHED_NAME + " is null";

Cursor c = getContentResolver().query(CallLog.Calls.CONTENT_URI, CALLOG_PROJECTION,
        CALLOG_WHERE, null, CallLog.Calls.DATE + " DESC");

This works well, but after i've created a contact from an unknown number, the result of the query still contains the unknown number.

If i open the Call Log activity window, i can see as the number changes to the name of the contact within a few seconds. So, the activity refreshes the CACHED_NAME column.

My question is, how can i programatically refresh (actualize) the Call Log ?