1

How can I start an intent to pick a phone number from call logs? I have tried using the following code to start the activity but it instead picks a phone from contacts which I don't want

Intent intent = new Intent(Intent.ACTION_PICK);
intent.setDataAndType(Uri.parse("content://call_log/calls"), ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
startActivityForResult(intent,1);

I would appreciate any help provided

Bruno
  • 3,872
  • 4
  • 20
  • 37
Enock Lubowa
  • 679
  • 8
  • 12

1 Answers1

0

I think it cannot be done using the ACTION.PICK. Try creating custom dialog with list of call logs using the content provider

Android pick up entry from call history screen

vyshak
  • 1