呼出状态 [英] Outgoing call status

查看:140
本文介绍了呼出状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询是,我想要得到通知,如果接收器的另一端选择时,我拨出电话我的电话。是否有可能与Android SDK中。

该onCallStateChanged功能仅被称为当人拨一个号码(摘机),从他的手机和当呼叫reciever人断开呼叫(IDLE),但没有状态参数knowthat,做另一端的人拥有:收到的电话吗?

 公共类MyPhoneStateListener扩展PhoneStateListener {

    公共无效onCallStateChanged(INT状态,串incomingNumber){
        Log.d(检查---->中,TelephonyManager.ACTION_PHONE_STATE_CHANGED);
    }
}
 

LogCat中只给出了以下信息,当呼叫:收到的另一面:

  01-19 19:33:30.633:DEBUG / CallNotifier(638):stopRing()...(摘机状态)
01-19 19:33:30.662:DEBUG /振铃(638):stopRing()...
01-19 19:33:30.694:DEBUG /振铃(638): -  stopRing:空mRingHandler!
01-19 19:33:31.256:DEBUG / PhoneApp(638):updateWakeState:callscreen真,拨号错误,扬声器假...
01-19 19:33:31.287:DEBUG / PhoneApp(638):updateWakeState:keepScreenOn =假(isR​​inging假,showingDisc假)
 

解决方案

我有同样的问题。我用PhoneStateListener来电,效果很好。但对于传出呼叫我只能注册一个BroadcastReceiver的意图android.intent.action.NEW_OUTGOING_CALL。

在我所知,没有办法确定天气对方回升,还是不行。但是你可以用CallLog检索呼叫信息下线。详细的呼叫状态事件只能通过内部类com.android.internal.telephony.Phone,你将不能访问,除非你编译自己的Andoid。

My Query is, I want to get notified if the receiver at the other side picks my call when I am making an outgoing call. Is it possible with the Android SDK.

The onCallStateChanged Function is called only when the Person dial a number(OFFHOOK), from his phone and When the call reciever person disconnects the call(IDLE), but there is no State parameter to knowthat, does the other end person has recieved the call?

public class MyPhoneStateListener extends PhoneStateListener{

    public void onCallStateChanged(int state,String incomingNumber){
        Log.d("Checking---->",TelephonyManager.ACTION_PHONE_STATE_CHANGED);
    }
}

Logcat give only the following information when call recieved at the other side:

01-19 19:33:30.633: DEBUG/CallNotifier(638): stopRing()... (OFFHOOK state)
01-19 19:33:30.662: DEBUG/Ringer(638): stopRing()...
01-19 19:33:30.694: DEBUG/Ringer(638): - stopRing: null mRingHandler!
01-19 19:33:31.256: DEBUG/PhoneApp(638): updateWakeState: callscreen true, dialer false, speaker false...
01-19 19:33:31.287: DEBUG/PhoneApp(638): updateWakeState: keepScreenOn = false (isRinging false, showingDisc false)

解决方案

I'm having the same problem. I use PhoneStateListener for incoming calls, it works well. But for outgoing calls I was only able to register a BroadcastReceiver to the intent android.intent.action.NEW_OUTGOING_CALL.

In my knowledge there is no way to determine weather the other side has picked up, or not. However you can use CallLog to retrieve call information offline. Detailed call state events are only available through the internal class com.android.internal.telephony.Phone which you won't have access to unless you compile your own Andoid.

这篇关于呼出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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