Checking the status of a phone call remotely

前端 未结 6 1360
情深已故
情深已故 2020-12-18 13:59

I want to check after starting a phone call what the status of the call is via a connected PC, if possible with the ADB. I\'m starting a call by entering a phone number with

6条回答
  •  抹茶落季
    2020-12-18 14:38

    Figuring out if the call is still in progress is pretty straight forward. You can either:

    • Monitor the logcat for the phone state
    • Write a bit of code to poll http://developer.android.com/reference/android/telephony/TelephonyManager.html#getCallState()
    • Write a bit of code to register for phone state http://developer.android.com/reference/android/telephony/PhoneStateListener.html

    Figuring out if the number called is currently busy is a totally different scope since you now have to deal with network specific implementation (cdma is wildly different than gsm). On CDMA it is almost impossible to figure it out.

提交回复
热议问题