5

Hey, I want to access the Android call list, so I can see the contact name, the hour of the calling, the duration, the hour of the calling and the date. Where is it, and how can I access it?

Thanks.

rogcg
  • 10,451
  • 20
  • 91
  • 133

1 Answers1

6

I believe you're looking for the CallLog class, which is part of android.provider.

See more info at http://developer.android.com/reference/android/provider/CallLog.html

You should be able to call it using the constructor listed there. Hope that helps!

EDIT: This may actually be more helpful to you: http://developer.android.com/reference/android/provider/CallLog.Calls.html

spanky
  • 1,479
  • 2
  • 11
  • 22
  • yeah, I'm reading this. But how can I implement the method getLastOutgoingCall(). I have a class that extends an Activity, but how can implement a CallLog.Calls method? – rogcg Nov 09 '10 at 17:56
  • 1
    Use {import android.provider.CallLog.Calls;} (without the {}) at the beginning of your Activity, with the rest of your imports. Then in your activity you can reference the class by using {Calls} (without the {}). You could call that method, for example, by using {Calls.getLastOutgoingCall()}. Here is some example code for similar operations: http://hi-android.info/src/com/android/phone/CallLogAsync.java.html – spanky Nov 09 '10 at 18:15