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
679 views
in Technique[技术] by (71.8m points)

adb - Fake Incoming Call Android

How can I fake an incoming call inside the android emulator?

The following lets me make a call but I'd like to force the emulator to receive a call, preferably from a number I've selected.

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

So, the direct opposite of the command above.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

You can use DDMS in Eclipse, Android Device Monitor in Android Studio or run command lines on terminal

Using DDMS:

  • Open DDMS/ADM
    • in Eclipse: Window > Open Perspective > DDMS
    • in Android Studio: Tools > Android > Android Device Monitor
  • Enter the fake incomming phone number
  • Choose "Voice"
  • Press call

enter image description here

After that, you will see the emulator receive this phone call as follows

enter image description here

Using command lines

$ telnet localhost 5554
$ gsm call 123456789

Note: 5554: console port number for emulator instance
12345678: incoming phone number


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

...