이것을보십시오 : 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;
}
보안상의 이유로 완전히 금지되어야하며 솔루션을 찾는 데 많은 희망을주지 않을 것입니다. – Gustek
예 -이 질문은 변호사/경찰/TLA 자석처럼 들립니다. OP - 그것을 제거해야합니다. (그리고 새로운 신원을 추측 할 수도 있음). –
@MartinJames, 아니, 내 주인공. –