How can I update the contents of an entry in the Call Log?

后端 未结 3 1456
情话喂你
情话喂你 2020-12-15 14:50

I would like to update the CallLog.Calls.TYPE field of the first entry in the Android Call Log from MISSED to INCOMING. I have read b

3条回答
  •  猫巷女王i
    2020-12-15 15:17

    ContentValues cv = new ContentValues();
    cv.put(CallLog.Calls.NUMBER,"7070770"); // contact number
    
    cv.put(CallLog.Calls.TYPE,1); // type
    
    cv.put(CallLog.Calls.DURATION, 120); // duration in second
    
    
    getContentResolver().insert(CallLog.CONTENT_URI, cv);
    

提交回复
热议问题