问题标签 [calllog]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
479 浏览

android - 如何获取 Android 联系人列表中的联系人 ID?

嘿,我想获取 Android 联系人列表中的联系人 ID。我的意思是,当我向手机添加联系人时,我认为它有一个 Id,提供此参数的类是什么?我的意思是确切的ID。

我已经搜索 CallLog.Calls 上的某些常量是否可以提供它,但我没有找到。也许是 Contacts.Contract,我不知道。有人知道吗?

谢谢!

0 投票
1 回答
2991 浏览

android - How to know that the content provider of calls has changed

Hey, I'd like to know if there is a way to know if the content provider of callings has changed. I mean, if I make a call, or I answer a call, it returns a "flag" that a new log has been added to the call log, or the place where Android store informations about callings.

Because, when I make a call, Android stores the number, the contact name(if exists), the hour of the calling, the duration, blah blah blah, all in the content provider. So is there a way to capture this "flag" that says the content provider of callings is bigger, I mean, that a new data has been inserted on the content provider CallLog.Calls.

(Updated)

So, I still have a lot of doubts related to this issue. I don't know where to register the content observer. My intention is when something change in the CallLog content provider, the insert method of the code will be used.

I mean, the code wont do anything unless new data has been added to the CallLog content provider. If some data has been added to the CallLog content provider, then the code will query the new data, and then will insert. I wanna do this because withou a Content observer the application was inserting data in the database that was already inserted every time I run the application, got it?

So here is my code. If someone could tell me where to put the registerContentObserver and everything else is needed I thank you.

0 投票
1 回答
385 浏览

android - Android:如何查找特定联系人的通话列表?

在android中给定一个联系人或联系人ID,我如何获取该联系人的通话列表?像通话记录一样,但只过滤到一个人(当然,可能有多个电话号码)。

0 投票
2 回答
37626 浏览

android - 如何为通话记录实现 ContentObserver

我想知道是否有办法知道呼叫的内容提供者是否已更改。我的意思是,如果我拨打电话或接听电话,它会返回一个“标志”,表明新日志已添加到通话记录中,或者 Android 存储有关通话信息的位置。

因为,当我拨打电话时,Android 会将号码、联系人姓名(如果存在)、通话时间、持续时间……都存储在内容提供程序中。那么有没有办法捕获这个“标志”,它说调用的内容提供者更大,我的意思是,已经在内容提供者 CallLog.Calls 上插入了一个新数据。

所以,我对这个问题还有很多疑问。我不知道在哪里注册内容观察者。我的意图是,当 CallLog 内容提供程序发生变化时,将使用代码的 insert 方法。

我的意思是,除非已将新数据添加到 CallLog 内容提供程序,否则代码不会执行任何操作。如果某些数据已添加到 CallLog 内容提供程序,则代码将查询新数据,然后将插入。我想这样做,因为没有内容观察者,应用程序在每次运行应用程序时都已插入的数据库中插入数据,明白了吗?

所以这是我的代码。如果有人能告诉我放在哪里registerContentObserver()以及需要的其他一切。

0 投票
1 回答
2436 浏览

android - Android ContentObserver onChange() 只返回 false

我正在尝试为 CallLog.Calls 内容提供者实现 ContentObserver。我的意思是,如果我拨打电话或接听电话等,观察者必须通知我 CallLog.Calls 内容提供程序已更改。但是 onchange 方法只返回 false,即使观察者已注册并得到通知。也许我做错了什么。

这是我的代码。这是一个活动。

0 投票
1 回答
3252 浏览

android - Android onChange() 方法只返回 false

我有一个 ContentObserver onChange() 在我的活动中声明为子类。但它总是返回 false。谁能告诉我为什么?

(更新) 如果 CallLog 内容提供程序发生更改,此代码必须调用 fillList。我的意思是,如果我进行一个新的调用,那么调用的数据将被插入到内容提供者中,所以它必须向观察者返回那里发生了一些变化,所以它会调用 fillList()。但它总是返回假的,即使我在模拟器上打了一个新电话。

这是代码。

0 投票
1 回答
1441 浏览

android - 我是否被迫使用 Android notifyChange() 方法?

我是否被迫使用 notifyChange() 方法?我问这个是因为,当我调用这个方法时,它会进入 onChange() 方法,但是当我不调用 notifyChange() 时,不会调用 onChange() 方法。为什么?

0 投票
2 回答
1955 浏览

android - Android ContentObserver 从未停止

我实现了一个 ContentObserver,它运行良好。但是现在每次 ContentObserver 被通知 CallLog.Calls 内容提供程序中的某些更改时,它都会运行 onChange() 方法而不会停止。

我希望我的观察者为内容提供程序中更改的每个项目运行一次。因此,如果向 CallLog.Calls 内容提供程序添加了 5 个新项目,则必须通知观察者 5 次,并且对于观察者的每次通知,都必须发生对 onChange() 方法的新调用。

这是我的代码。

0 投票
3 回答
6506 浏览

android - 是否可以在 Android 中检测被拒绝的呼叫?

在我的应用程序中,当用户拒绝来电时拦截会很好,即选择发送忙音。除了在有来电时得到通知之外,还有什么方法可以做到这一点?我在文档中没有找到任何关于此的内容。此信息是否存储在通话记录中,即我可以轮询通话记录以查看呼叫是否被拒绝或应答?

0 投票
2 回答
9243 浏览

android - 如何创建打开通话记录活动的 Intent?

我想创建一个 Intent 来打开显示当前设备通话记录的屏幕?

我将如何指定这样的意图?