1

I would like to be able to use ADB to fully manage the process of a phonecall (primarily as I have cracked my screen and cannot see anything).

I know I can initiated a phonecall through:

adb shell am start -a android.intent.action.CALL -d tel:1234567890

Similarly I know I can use key events to end a call:

adb shell input keyevent KEYCODE_ENDCALL

However I have run into issues when the voicemail asks "press 1 to listen to your message, 2 for settings, etc".

I was hoping that the following command would work:

adb shell input keyevent KEYCODE_1

or at least the following:

adb shell sendevent /dev/input/event0 1 2 1
adb shell sendevent /dev/input/event0 1 2 0

However the voicemail does not recognise the selection and just repeats the message. I have no way to validate visually as I have no access to the screen.

Any suggestions?

Thanks for your help.

References:

  1. Making a call through adb How to make a call via pc by ADB command on android?
  2. Input event and events' list ADB Shell Input Events
  3. Send event https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/il2PqSKRFNI
4

1 回答 1

0

在通话过程中,您需要切换到“拨号盘”选项卡才能发送 DTMF 代码

于 2013-02-21T19:18:20.817 回答