0
모든 통화 로그를 구문 분석하려고하지만 첫 번째 호출 만 끝나면 커서가 바운드됩니다. - 루프 동안, 나는 조건이 될 필요가 생각이 있기 때문에아웃 바운드 통화 인덱스 용 커서
if (c != null && c.getCount()>0) {
if (c.moveToFirst()) {!
type = Integer.parseInt(c.getString(c.getColumnIndex(CallLog.Calls.TYPE)));
do {
try{
Log.d(this.getClass().getName(),"Date is "+c.getString(c.getColumnIndex(Calls.DATE)));
}catch(Exception e){
Log.d(this.getClass().getName(),"Exception: DATE IS NULL!!");
}
//String timestamp = c.getString(c.getColumnIndex(Calls.DATE));
//Log.d(this.getClass().getName(),"timestamp is: "+timestamp);
try{
long duration= c.getLong(c.getColumnIndex(CallLog.Calls.DURATION));
}catch(Exception e){
Log.d(this.getClass().getName(),"Exception: DURATION IS NULL!!");
}
//callDuration.put(timestamp, duration);
}
while (!c.moveToNext());
}
}