我想知道用户是否阅读了未接来电。如果它是由用户阅读的,那么我必须更新内容提供者。我怎样才能做到这一点?
问问题
1311 次
2 回答
1
检查此链接,我认为这将对您有所帮助:
http://developer.android.com/reference/android/provider/CallLog.Calls.html
于 2013-10-29T09:20:36.813 回答
0
尝试这个 :
String[] projection = new String[]{CallLog.Calls.NUMBER,
CallLog.Calls.TYPE,
CallLog.Calls.DURATION,
CallLog.Calls.CACHED_NAME,
CallLog.Calls._ID};
String where = CallLog.Calls.TYPE+"="+CallLog.Calls.MISSED_TYPE+" AND NEW = 1";
Cursor c = context.getContentResolver().query(CallLog.Calls.CONTENT_URI,projection,where, null, null); c.moveToFirst();
Log.d("CALL", ""+c.getCount());
if(c.getCount() > 0)
// code that displays the number of missed calls;
于 2013-10-29T09:19:44.957 回答