I am trying to mark the missed calls to read. I am trying the following to do so:
ContentValues values = new ContentValues();
values.put(Calls.NEW, Integer.valueOf(0));
if (android.os.Build.VERSION.SDK_INT >= 14){
values.put(Calls.IS_READ, Integer.valueOf(1));
}
StringBuilder where = new StringBuilder();
where.append(Calls.NEW);
where.append(" = 1 AND ");
where.append(Calls.TYPE);
where.append(" = ?");
ContentResolver cr = getContentResolver();
Uri baseUri = Uri.parse("content://call_log/calls");
int numUpdated = cr.update(baseUri, values, where.toString(),new String[]{ Integer.toString(Calls.MISSED_TYPE) });
This actually marks the call read for my app but native android app is not detecting this and still show missed call badge and notification. How can we get this cleared.
You can't clear missing call notification. Google disabled access to this functionality to third party apps.