L
L
lahomie932018-10-19 19:50:04
Android
lahomie93, 2018-10-19 19:50:04

Access to the phone book in Android. Where to begin?

Hello. I am writing an android application that should display a list of all calls made, their date and time. Tell me, please, how can I access the data of the phone book and calls? Where do I begin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-10-19
@lahomie93

From reading documentation

Cursor cursor = contentResolver.query(CallLog.Calls.CONTENT_URI,
    new String [] {Calls._ID, Calls.NUMBER, Calls.DURATION, Calls.TYPE},
    null, null, Calls.DATE + " DESC ");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question