如何区分未接来电和拒接电话?
我正在设计一个应用程序,在该应用程序中,我需要区分被接收者拒绝的呼叫(通过按拨号按钮)与未应答的呼叫以及被拨号的呼叫断开的呼叫。由于这两者都属于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你缺少一些细节;请指教。
您指的是呼叫日志提供程序
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.