Question Detail

I want to call default Call log Application form my app programmatically how can I call default call log application?

I am not able to open Call history App searched whole day but not get any working solution. I got something which is open the Default Call App but there is already open number keypad to dial call but I need the only listing of my call Activities.


Thread Reply

Hemant Sharma

- 5 months ago

try this Call your Default Android Mobile Call Log listing.

void callsLayoutMethod() {
    Intent i = new Intent();
    i.setAction(Intent.ACTION_VIEW);
    i.setData(Uri.parse("content://call_log/calls/1"));
    if (i.resolveActivity(getPackageManager()) != null) {
        startActivity(i);
    } else {
        try {
            Intent showCallLog = new Intent();
            showCallLog.setAction(Intent.ACTION_VIEW);
            showCallLog.setType(CallLog.Calls.CONTENT_TYPE);
            startActivity(showCallLog);
        } catch (Exception e) {
            Toast.makeText(mActivity, "Call log App not Found!", Toast.LENGTH_SHORT).show();
        }
    }
}

Hemant Sharma

- 5 months ago

try this Call your Default Android Mobile Call Log listing.

void callsLayoutMethod() {
    Intent i = new Intent();
    i.setAction(Intent.ACTION_VIEW);
    i.setData(Uri.parse("content://call_log/calls/1"));
    if (i.resolveActivity(getPackageManager()) != null) {
        startActivity(i);
    } else {
        try {
            Intent showCallLog = new Intent();
            showCallLog.setAction(Intent.ACTION_VIEW);
            showCallLog.setType(CallLog.Calls.CONTENT_TYPE);
            startActivity(showCallLog);
        } catch (Exception e) {
            Toast.makeText(mActivity, "Call log App not Found!", Toast.LENGTH_SHORT).show();
        }
    }
}