Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to update call logs through android applications
- Uri allCalls = Uri.parse("content://call_log/calls");
- Cursor c = managedQuery(allCalls, null, null, null, null);
- if (c.moveToFirst()) {
- do{
- String callType = "";
- switch (Integer.parseInt(c.getString(
- c.getColumnIndex(Calls.TYPE))))
- {
- case 1: callType = "Incoming";
- break;
- case 2: callType = "Outgoing";
- break;
- case 3: callType = "Missed";
- }
- } while (c.moveToNext());
- }
- ContentValues values=new ContentValues();
- values.put("name", "Unknown");
- int k=getContentResolver().update(allCalls, values,null, null);
Add Comment
Please, Sign In to add comment