如何区分未接来电和拒接电话?

发布于 2024-11-18 18:59:59 字数 109 浏览 5 评论 0原文

我正在设计一个应用程序,在该应用程序中,我需要区分被接收者拒绝的呼叫(通过按拨号按钮)与未应答的呼叫以及被拨号的呼叫断开的呼叫。由于这两者都属于 Android 中的未接来电类别,因此有什么可以区分的吗?

I am designing an application in which I need to differentiate between a call rejected by the receiver (by pressing the dialing button) with the one not answered and is disconnected by the one who is dialing. is there anything that makes a differentiation since both of these come under the missed call category in Android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼泪淡了忧伤 2024-11-25 18:59:59

你缺少一些细节;请指教。

您指的是呼叫日志提供程序android.provider.CallLog.Calls吗?仅定义了 3 种调用类型。您能否提供此类呼叫日志条目的所有字段的数据?

(我们知道)唯一的其他判断方法是观察电话状态(通过 IntentReceiver)并自己跟踪转换。最有可能的是,从响铃到空闲的转换表明呼叫被拒绝而不是应答,在这种情况下,它将把响铃转换到摘机。

You are lacking some details; please advise.

Are you referring to the Call Log provider android.provider.CallLog.Calls? There are only 3 call types defined. Can you provide the data of all the fields for such a Call Log entry?

The only other way (we know of) to tell is to watch the Phone State (via IntentReceiver) and track the transitions yourself. Most likely, a transition of Ringing to Idle would indicate the call was refused instead of answered, in which case it would transition Ringing to Offhook.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文