[英]Why can't I edit the call log for an unsaved incoming number?
I want to edit a call log history. 我想编辑通话记录历史记录。 I wrote simple code for editing the call log.
我写了简单的代码来编辑通话记录。 I put
CACHED_NAME
or other name variables, but I didn't see any changes in the call log. 我放入了
CACHED_NAME
或其他名称变量,但在通话记录中没有看到任何更改。 Why doesn't it work? 为什么不起作用? Here is my code:
这是我的代码:
ContentValues values = new ContentValues();
values.put(CallLog.Calls.CACHED_NAME, "Edited Name");
getContentResolver().update(CallLog.Calls.CONTENT_URI,
values, CallLog.Calls.NUMBER + "=?", new String[] { String.valueOf(number) });
Edit: I added write and read call log permissions in the manifest file. 编辑:我在清单文件中添加了写入和读取呼叫日志权限。
Because the system doesn't want random apps to be able to update the call log with possibly incorrect data. 因为系统不希望随机应用程序能够使用可能不正确的数据更新呼叫日志。 So they don't export that capability to just any app- you have to be the registered telecom app.
因此,他们不会将此功能仅导出到任何应用程序-您必须是注册的电信应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.