Call Log Calls entry is this
- Name Number TYPE date called
- Jed 12345 Incoming 7-18-2013
- Roger 14611 Incoming 7-18-2013
- Jed 12345 Incoming 7-18-2013
- Jed 12345 Incoming 7-18-2013
- Kevin 11111 Incoming 7-18-2013
嗨,我想在 android 中查询,这样我只会检索 Jed,12345 << 因为他在列表中具有最重复的值,我想在 sqlite(android 查询)中执行此操作,但我不知道要调用哪些函数是我使用的代码,但我只能获得最近调用的号码,而不是条目最多的号码。我如何进行查询?
Date date=new Date() ;
Cursor c = contxt.getContentResolver().query(CallLog.Calls.CONTENT_URI,
null, CallLog.Calls.TYPE + " AND " + CallLog.Calls.INCOMING_TYPE +
" AND " + CallLog.Calls.Date + ">=" + date.getDate() ,
null,
CallLog.Calls.DATE + " DESC LIMIT 1");
if(c!=null)
do{
int callCounter = c.getCount();
String num = callLog_cursor.getString(callLog_cursor
.getColumnIndex(android.provider.CallLog.Calls.NUMBER));
}while(c.moveToFirst());