Click here to Skip to main content
16,020,669 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How to retrieve call log to list view in android
Posted

so easy :
HTML
public ArrayList<systemcalllog> queryAllCallLog() {
        ArrayList<systemcalllog> result = null;
        final ContentResolver contentResolver = mContext.getContentResolver();
        Cursor cursor = contentResolver.query(CallLog.Calls.CONTENT_URI, null,
                null, null, SystemCallLog.Columns.DATE
                        + " COLLATE LOCALIZED desc");
        if (null != cursor) {
            result = new ArrayList<systemcalllog>();
            SystemCallLog item = null;
            while (cursor.moveToNext()) {
                item = SystemCallLog.formatCursor(cursor);
                result.add(item);
            }
            cursor.close();
        }// end if
        return result;
    }
</systemcalllog></systemcalllog></systemcalllog>

if you want to know more about that ,just flow:http://www.cppcode.com....

gagagaga....
 
Share this answer
 
Check this Link[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900