歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 在Android模擬器上模擬來電

在Android模擬器上模擬來電

日期:2017/3/1 11:08:46   编辑:Linux編程

最近項目要做一個控制來電顯示的Android 應用

需要在Emulator上模擬來電 效果

方法如下:

1.單個電話

打開命令行cmd,輸入telnet 回車.

然後輸入 o localhost 5554 回車,連到Emulator上.

輸入gsm call 123456 上面顯示OK

這時再去看模擬器,上面就有來電了.

其他:
掛斷電話:gsm cancel <模擬打進的電話號碼>
設置其他模式:gsm voice unregistered為網絡無法聯通,denied為緊急呼叫模式

help gsm
allows you to change GSM-related settings, or to make a new inbound phone call

available sub-commands:
gsm list list current phone calls
gsm call create inbound phone call
gsm busy close waiting outbound call as busy
gsm hold change the state of an oubtound call to 'held'
gsm accept change the state of an outbound call to 'active'
gsm cancel disconnect an inbound or outbound phone call
gsm data modify data connection state
gsm voice modify voice connection state
gsm status display GSM status

2. 多個模擬器模擬播打電話
啟動多個模擬器,在模擬器A中播模擬器B的端口號碼,即可。

3.發送短信
sms send <模擬發送短信的電話號碼> <短信內容>
例如:sms send 1234567 Hello

Copyright © Linux教程網 All Rights Reserved