问题
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?
回答1:
Phone state is Phonestate.Offhook
as you are answering the call by offhooking the phone, it's obvious.
来源:https://stackoverflow.com/questions/9756815/what-is-the-phonestatelistener-state-when-outgoing-call-is-answered