Android Call Log change notification example

Learnt about How to read call logs in Android phone, this tutorial will tell how to listen to Android call log changes in  phone.

If any call log entry is added, deleted or updated, then fire a notification event. Here are the simple steps.

1) Create a class to receive the call log change events

public class CallLogChangeObserverClass extends ContentObserver
public CallLogChangeObserverClass(Handler handler, Context ct) {
// TODO Auto-generated constructor stub

public void onChange(boolean selfChange) {
Toast.makeText(getApplicationContext(), "call log changed", Toast.LENGTH_LONG).show();
//Read call Logs here

2) Register  & unregister for content observer from your activity for call log change events.

CallLogChangeObserverClass callLogchangeevents = null;

protected void onCreate(Bundle savedInstanceState) {

callLogsReader = (Button)findViewById(;

callLogchangeevents = new CallLogChangeObserverClass(new Handler(),this);

//Registering content observer
getContentResolver().registerContentObserver(CallLog.Calls.CONTENT_URI, true,


Now give a missed call and test it. Make sure you unregister once you finish your work, or upon exist from activity. Else this would cause memory leak.

//Unregister from call log change activities