Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
867 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 Reply

0 votes
by (71.8m points)

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

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...