これを見てください:http://developer.android.com/reference/android/content/ContentProvider.html。通話が終了したときに追いつくために BroadcastReceiver を実装する必要があります。その後 update() メソッドで請求番号を変更できます。CallLog は、連絡先に関連付けられた ContentProvider から情報を取得します。
それで、私は不在着信と名前を受け取りました。読み取りの CallState を変更した後。これは、不在着信カウントを取得する方法の例です。
private int getUnreadCallsCount()
{
if (c != null)
{
c.close();
c = null;
}
String[] projection = { CallLog.Calls.CACHED_NAME, CallLog.Calls.CACHED_NUMBER_LABEL, CallLog.Calls.TYPE };
StringBuilder where = new StringBuilder();
where.append(Calls.NEW);
where.append(" = 1 AND ");
where.append(Calls.TYPE);
where.append(" = ");
where.append(Calls.MISSED_TYPE);
c = context.getContentResolver().query(CallLog.Calls.CONTENT_URI, projection, where.toString(), null, null);
if (c != null)
{
c.moveToFirst();
return c.getCount();
}
else
return 0;
}