通話ログを読み取るコードがあります
String[] strFields = {
android.provider.CallLog.Calls.DATE,
android.provider.CallLog.Calls.TYPE,
android.provider.CallLog.Calls.DURATION,
android.provider.CallLog.Calls.NUMBER
};
//READ CALL LOG
Cursor callCursor = getContentResolver().query(android.provider.CallLog.Calls.CONTENT_URI,strFields, null, null,android.provider.CallLog.Calls.DATE + " ASC");
startManagingCursor(callCursor);
int dateColumn = callCursor.getColumnIndex(android.provider.CallLog.Calls.DATE);
// type can be: Incoming, Outgoing or Missed
int typeColumn = callCursor.getColumnIndex(android.provider.CallLog.Calls.TYPE);
// get duration of calls
int durationColumn = callCursor.getColumnIndex(android.provider.CallLog.Calls.DURATION);
// get number
int numberColumn = callCursor.getColumnIndex(android.provider.CallLog.Calls.NUMBER);
Calendar calendarCall = Calendar.getInstance();
if(callCursor.moveToFirst()){
do{
callDate = callCursor.getLong(dateColumn);
callType = callCursor.getInt(typeColumn);
callDuration = callCursor.getInt(durationColumn);
callNumber = callCursor.getString(numberColumn);
switch(callType){
case android.provider.CallLog.Calls.INCOMING_TYPE:
break;
case android.provider.CallLog.Calls.MISSED_TYPE:
break;
case android.provider.CallLog.Calls.OUTGOING_TYPE:
break;
}
}while(callCursor.moveToNext());
}
ここでの問題は、Viber の呼び出しも含まれていることですが、それらを除外したいと考えています。通話ログから Viber 通話を除外する方法はありますか? ありがとう