i am using this code the get to the contact info of a contact (i am using it also - with a few modifications - to call, send sms or email the contact). I wonder if there is
There is a class called CallLog.Calls that contains the CONTENT_URI to query for call history.
Here's an example listing the phone numbers in the call log:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.main);
String[] projection = new String[] {
CallLog.Calls._ID, CallLog.Calls.NUMBER};
Cursor query = this.managedQuery(
CallLog.Calls.CONTENT_URI, projection, null, null, null);
ListAdapter adapter = new SimpleCursorAdapter(
this, android.R.layout.simple_list_item_1, query,
new String[] {CallLog.Calls.NUMBER},
new int[] {android.R.id.text1});
this.setListAdapter(adapter);
}