Hi, I would like to filter the call history that I am getting by android, that is, show only those of one of my contacts, I am not sure if this can be done. Here is the function that works for me without problem:
private void getCallDetails() {
Cursor managedCursor = managedQuery(CallLog.Calls.CONTENT_URI, null,
null, null, null);
int number = managedCursor.getColumnIndex(CallLog.Calls.NUMBER);
int name_count =
managedCursor.getColumnIndex(CallLog.Calls.CACHED_NAME);
while (managedCursor.moveToNext()) {
name = managedCursor.getString(name_count);
phNumber = managedCursor.getString(number);
model.add(new Item_llamadas(name, phNumber));
} //managedCursor.close(); textView.setText(sb); } }
listapersonalizada.setAdapter(new Adapter_llamadas(this, model));
}