应答拨出电话时,PhoneStateListener的状态是什么? [英] What is the PhoneStateListener state when outgoing call is answered?

查看:74
本文介绍了应答拨出电话时,PhoneStateListener的状态是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我的应用何时接听去电.我正在使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆