Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
871 views
in Technique[技术] by (71.8m points)

android - Checking the status of a phone call remotely

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 the adb command service call phone 2 s16 "some phone number" and then sending input keyevent 5 to press the call button.

Now I'm struggeling to find a way to determine the status of the call. I need to know if the the number getting called is currently busy, if the call got cancelled or if the call was successfull/that I have an open voice connection to the called number. Is there any way of monitoring that?

The phone model really doesn't matter nor the android service/app I use to call the number nor the android version. The phone will be/is rooted. I will use whatever works.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

adb shell dumpsys telephony.registry | grep mCallState, will return:

  • 0 indicates idle,
  • 1 = ringing and
  • 2 = active call

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...