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,463
  • 4
  • 20
  • 34
Enock Lubowa
  • 569
  • 5
  • 11

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