应答拨出电话时,PhoneStateListener的状态是什么? [英] What is the PhoneStateListener state when outgoing call is answered?
问题描述
我想知道我的应用何时接听去电.我正在使用PhoneStateListener
类中称为onCallStateChanged()
的方法.我正在查看接听拨出电话时的Logcat,以查看其进入的状态(空闲,摘机或响铃).根据文档,我认为它将进入OFFHOOK
,但事实并非如此.
关于如何检测正在应答的去电有任何想法吗?
I want to know when an outgoing call is answered in my app. I am using a method called onCallStateChanged()
from the PhoneStateListener
class. I am looking at the Logcat when the outgoing call is answered to see which state it goes into (IDLE, OFFHOOK or Ringing). As per the documentation I would think it would go into the OFFHOOK
but that is not the case.
Any ideas on how I can detect the outgoing call being answered?
推荐答案
当您通过摘机接听电话时,电话状态为Phonestate.Offhook
,这很明显.
Phone state is Phonestate.Offhook
as you are answering the call by offhooking the phone, it's obvious.
这篇关于应答拨出电话时,PhoneStateListener的状态是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!